From 879e8ca18943658e6f798ddf0d0c0d942c0c4b78 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Mon, 14 Sep 2020 19:35:10 -0400 Subject: [PATCH] XLSX write --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index 8773442..ca86cf2 100644 --- a/index.html +++ b/index.html @@ -33,6 +33,7 @@ Output Format:
Drop a spreadsheet file here to see sheet data
... or click here to select a file @@ -119,6 +120,12 @@ var process_wb = (function() { return ""; }; + var to_xlsx = function to_xlsx(workbook) { + HTMLOUT.innerHTML = ""; + XLSX.writeFile(workbook, "SheetJSTest.xlsx"); + return ""; + }; + return function process_wb(wb) { global_wb = wb; var output = ""; @@ -126,6 +133,7 @@ var process_wb = (function() { case "form": output = to_fmla(wb); break; case "html": output = to_html(wb); break; case "json": output = to_json(wb); break; + case "xlsx": output = to_xlsx(wb); break; default: output = to_csv(wb); } if(OUT.innerText === undefined) OUT.textContent = output;