JayP718 / powertable_bb_plugin

A "Datatable" like plugin which allows you to build a table based off of custom queries, supporting row selection, data export, and more!
MIT License
13 stars 1 forks source link

CSV export does not add newlines #3

Open jowkar opened 1 year ago

jowkar commented 1 year ago

I'm attempting to export data loaded into a powertable component from a query result in budibase. While the export to csv button does export the data, it misses adding newlines for me, leading to a malformed CSV file. Maybe this is an issue with the character '\r\n' being windows specific, vs '\n' , which is the standard newline on mac and linux. But upon opening the exported file in vim and viewing the content with set: list, which typically reveals invisible characters such as newlines, there are no special characters shown. So maybe the issue is something else.

Excerpt from result of csv export on table with mock data (note the lack of newlines after the exported internal row identifier "_id" ):

umid,subject,spmembership,sp2membership,pmembership,pp,sp,op,ssamplename,batch,btype,bsource,pm,runid,datatype,_id"","102","","","","","","","","","","","","","","cab31d7b3a3a34275afa6ad0a89602c53""","778","","","","","","","","","","","","","","ce1aea26b5f26495fb27b79dd93c70f59""","77","","","","","","","","","","","","","","c241da6d936d745aaaa17dfbe47e66cd9""","new_subject","","","","","","","","","","","","","","c291710828e2a428d8f64a6174bf6ecdf""","CYCLE","","","","","","","","","","","","","","cf349add6d90647779f66555fd8d071a0""um100","100","","","","","","","ss100","batch100","","","","run100","","c3c4f8ae574f04922a596cf4b1562b3f0""um100","100","","","","","","","ss432","batch100","","","","run100","","c04b04651f3724ae5999dcb5810e40113"