csvFlash problem with num columns

csvFlash problem with num columns

AndersHAndersH Posts: 3Questions: 1Answers: 0

Hi,

I'm wondering if there's a problem with my code or if there's perhaps a bug in buttons.flash. When I try to export to csv using the built-in csvFlash button, the code crashes at line 535 in buttons.flash.js:

boundary + a[i].replace( boundary, '\'+boundary ) + boundary :

Because the array a contains an int and not only strings. This array comes from the toArray() datatables function earlier. I initialized my table with data from a javascript array. Replacing the above line with:

boundary + (a[i] + '').replace( boundary, '\'+boundary ) + boundary :

works but is not a great solution. Even setting all column types to 'string' does not work. Any other suggestions?
Unfortunately, I'm unable to provide a testcase using live.datatables.net as buttons.flash can't be selected as an import.

Grateful for help,
Anders

This discussion has been closed.