How do I save as CSV without quotes?

How do I save as CSV without quotes?

e_kingstonee_kingstone Posts: 2Questions: 1Answers: 0

Hi, I figure out how to change the extension as .txt, but the options for no boundary aren't working, is this a bug?

Basically, I want to go from this:
"item1" "item2" "item3" "item4"

To this:
item1 item2 item3 item4

I modified buttons.html5.min.js for csv from:
filename: "*",
extension: ".csv",
exportOptions: {},
fieldSeparator: ",",
fieldBoundary: '"',
escapeChar: '"',
charset: null,
header: !0,
footer: !1

to

filename: "*",
extension: ".txt",
exportOptions: {},
fieldSeparator: "\t",
fieldBoundary: "",
header: !0,
footer: !1

But it still outputs with quotes...

The copy button works how I want, but no txt file is generated

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,930Questions: 1Answers: 10,154 Site admin
    Answer ✓
          {
            extend: 'csvHtml5',
            fieldBoundary: ''
          }
    

    appears to work just fine for me: http://live.datatables.net/hawalusa/1/edit .

    Please link to a test case showing the issue.

    Allan

  • e_kingstonee_kingstone Posts: 2Questions: 1Answers: 0

    Thank you, it works now.

    My mistake was that I downloaded the buttons.html5.min.js and made those modifications in the locally downloaded file.

    Using your method of initializing it via javascript in the html/php page was the way to go.

    Weird that I could change the file extension by modifying the script but not the fieldBoundary.

    Thank you so much again :)

This discussion has been closed.