Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
26
rated 0 times [  27] [ 1]  / answers: 1 / hits: 7950  / 4 Years ago, thu, june 11, 2020, 12:00:00

I would like to know if it is possible to create an Excel File and make it downloaded from a web page with javascript ?



Currentlly, I succes to create a .csv and make it downloaded with the following code :



var blob = new Blob([csvText], { type: 'text/csv;charset=UFT-8;' });
var link = document.createElement(a);
if (link.download !== undefined) { // feature detection
// Browsers that support HTML5 download attribute
var url = URL.createObjectURL(blob);
link.setAttribute(href, url);
link.setAttribute(download, file.csv);
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}


I am wondering if there is any librairies in javascript with permit to convert the file from csv format to xlsx format and make it downloaded the same way than the csv ?



The final aim is to set a template in the downlaoded xlsx.


More From » excel

 Answers
5

There is couple of options
https://github.com/stephenliberty/excel-builder.js



Another github project with less Excel options but less worries about Excel compatibility issues can be found here: ExcellentExport.js
https://github.com/jmaister/excellentexport


[#3509] Tuesday, June 9, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bradleymoisesy

Total Points: 121
Total Questions: 105
Total Answers: 95

Location: Nepal
Member since Mon, Jan 4, 2021
3 Years ago
bradleymoisesy questions
Wed, Dec 22, 21, 00:00, 2 Years ago
Tue, Jun 1, 21, 00:00, 3 Years ago
Thu, Jan 16, 20, 00:00, 4 Years ago
;