How to: Export CSV with multiple same header name

Hello guys.

I need help to export csv file with some headers of the same same, for example:

ID,AMOUNT,DESC,AMOUNT,AMOUNT

I know it doesn’t look clever but that’s beyond my control since it’s the format required the app we need to export the data to.

In my original db, I have the AMOUNT1,AMOUNT2 and then I used alias to rename them to AMOUNT but the CSV only export single AMOUNT column.

How do I go about this? Thanks in advance for any insight.

Hi. I don’t really have a solution, but out of curiosity, does the Wappler query return multiple columns with same name in response?

A suggestion would be build a custom module to quickly get this to work. I think there are libraries out there to help with it.

I don't think so. Anyway I have resorted to client side csv export using js.