Tabletools - problem with csv with data containing CR/LF

Tabletools - problem with csv with data containing CR/LF

jimvjimv Posts: 27Questions: 0Answers: 0
edited February 2012 in General
I'm using DataTables with both the TableTools and the Editable plug-ins for a web app I am developing.
All is working well, except for the csv/excel export.
In any text field where someone has hit enter or return, the data does not show up correctly in Excel. The data is in the wrong column and spread out over multiple rows.
I believe that the problem is with CR/LF/Newline, but not sure if that is the exact issue or not. I've played with TableTools sFieldBoundary and sFieldSeperator, but that has not fixed the problem.
I've also looked at json encoding/decoding, and I think I have that correct, but I'm not sure.
Test site where you can see the problem is at http://wwwtest.registrar.wisc.edu/wacrao/test.html
Any help/sugggestions appreciated.
Thanks
Jim

Replies

  • jimvjimv Posts: 27Questions: 0Answers: 0
    I have mostly resolved this issue.
    I had not seen the sNewLine parameter; by setting it to Auto, the data is now exported correctly for excel.
    Unfortunately, formatting is lost in the process. If the data has a CR/LF in it, that is removed and replaced with a space (I think). I've tried using auto, /r/n and /n, all seem to make the file import into excel correctly, but none keep the new line formatting.
This discussion has been closed.