hhurz / tableExport.jquery.plugin

jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF
MIT License
984 stars 714 forks source link

How to change the csv delimiter #351

Closed santocch closed 2 years ago

santocch commented 2 years ago

Hello,

I tried to find a simple way to change the character used as csv delimiter but I didn't find any option to do it... it would be great to have this option: in my country (Italy) the standard is to use the semicolon (see wikipedia: Semicolons are often used instead of commas in many European in order to use the comma as the decimal separator and, possibly, the period as a decimal grouping character.)

The dirty trick to solve this problem is simple (change the character in the hard coded csvSeparator variable in tableExport.min.js) but that's not right way to do things...

Thanks

hhurz commented 2 years ago

Use the csvSeparator option:

$('#tableID').tableExport({type:'csv', csvSeparator: ';'});
santocch commented 2 years ago

Thanks... it works but I still have a problem to use it with https://github.com/wenzhixin/bootstrap-table so I close this one and continue there.