1
1
1001001 1112014-11-27 10:49:28
JavaScript
1001001 111, 2014-11-27 10:49:28

save in excel using javascript?

In general, I save data in excel using the function

window.open('data:application/vnd.ms-excel,' +  '5620140829152611');

Everything is saved normally, but when opening the Excel file, the number 5620140829152611 is replaced by 5620140829152610.
Any suggestions? M.b. any options need to be written in data:application/vnd.ms-excelso that all cells in excel are initially in text format?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2014-11-27
@IgorO2

You are not generating a valid Excel file, but hacking it.
In this case, no options can be passed, because they are stored in the internal structure of the file, and you have no structure.
The only way is to use another hack:

window.open('data:application/vnd.ms-excel,' +  "'5620140829152611'");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question