Thursday 15 August 2013

Newline characters in CSV Data URI not showing up -


I have a CSV data

  column 1, column 2, column 3 data 1 , Data 2, Data 3 Data 1, Data 2, Data 3  

I'm in the form of a Z-variable, which is similar to HTML in the form of a fully interpolated string, And I get it in the a link

  Var link = document.getElementById ('link'); Var data = 'column1, column2, column3 \ n \ rdata1, data2, data3 \ n \ rdata1, data2, data3'; Link.href = 'Data: Text / CSV' + Data;  
  & lt; Id = "I used javascript to insert data here for the demo" link = "download =" data csv "> download & lt; / a & gt;  

, but I'm actually using Z as server side: (I do not think it separates in any way ..)

 The problem is that it is not of new characters. (/ [\ R \ n] /, \ "\" \ R \ n ')} download "download =" data.csv ") downloading. When I download the file I do not have a new letter in it. 

In fact, the wiki says that

If I do not misunderstand, So it is possible that this is possible.

Is the new lining of CSV download in the data URI format probably not possible, or is there any way I can remember?


No comments:

Post a Comment