From 67de66935038b7b1e482eda741a584bbefb6c3d6 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Wed, 19 Apr 2017 23:36:29 -0400 Subject: [PATCH] update --- ajax.html | 25 +++++++++---------------- index.html | 38 +++++++++++++++++++++++++++----------- tests/index.html | 2 +- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/ajax.html b/ajax.html index f836bdf..54d483e 100644 --- a/ajax.html +++ b/ajax.html @@ -4,27 +4,20 @@ -JS-XLSX AJAX Live Demo +SheetJS JS-XLSX AJAX Live Demo -JS-XLSX (XLSX/XLSB/XLSM) AJAX Live Demo
-Github Repo
-Issues? Something look weird? Click here and report an issue
+
+SheetJS AJAX Live Demo
+(this demo works back to IE6)
+
+Github Repo
+Issues?  Something look weird?  Click here and report an issue
 
+

 
diff --git a/index.html b/index.html index a5fc619..d969fd6 100644 --- a/index.html +++ b/index.html @@ -18,28 +18,34 @@ #b64data{ width:100%; } +a { text-decoration: none } -JS-XLSX Live Demo
-Source Code Repo
-Issues? Something look weird? Click here and report an issue
-Output Format: - +
-
Drop a spreadsheet file here to see sheet data
-

... or click here to select a file

+ ... or click here to select a file +
-Advanced Demo Options:
-Use Web Workers: (when available)
-Use Transferrables: (when available)
-Use readAsBinaryString: (when available)
+Advanced Demo Options: +Use Web Workers: (when available) +Use Transferrables: (when available) +Use readAsBinaryString: (when available) +

+

@@ -178,6 +184,15 @@ function to_formulae(workbook) { return result.join("\n"); } +function to_html(workbook) { + document.getElementById('htmlout').innerHTML = ""; + var result = []; + workbook.SheetNames.forEach(function(sheetName) { + var htmlstr = X.write(workbook, {sheet:sheetName, type:'binary', bookType:'html'}); + document.getElementById('htmlout').innerHTML += htmlstr; + }); +} + var tarea = document.getElementById('b64data'); function b64it() { if(typeof console !== 'undefined') console.log("onload", new Date()); @@ -196,6 +211,7 @@ function process_wb(wb) { case "form": output = to_formulae(wb); break; + case "html": return to_html(wb); default: output = to_csv(wb); } diff --git a/tests/index.html b/tests/index.html index 21ac1b9..a402c2f 100644 --- a/tests/index.html +++ b/tests/index.html @@ -13,7 +13,7 @@ -

JS-XLSX Browser-based Parsing Tests

+

JS-XLSX Browser-based Parsing Tests

File Formats