forked from sheetjs/docs.sheetjs.com
		
	https
This commit is contained in:
		
							parent
							
								
									22720fd7a6
								
							
						
					
					
						commit
						ce7a1f15ee
					
				| @ -343,7 +343,7 @@ npx react-native init SheetJSRN --version="0.67.2" | ||||
| 
 | ||||
| ```bash | ||||
| cd SheetJSRN | ||||
| curl -LO http://oss.sheetjs.com/assets/img/logo.png | ||||
| curl -LO https://oss.sheetjs.com/assets/img/logo.png | ||||
| npm i -S https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz | ||||
| npm i -S react-native-table-component react-native-document-picker | ||||
| ``` | ||||
|  | ||||
| @ -630,7 +630,7 @@ The server is listening on that URL.  Open the link in a web browser. | ||||
| 5) Replace `pages/index.vue` with the following: | ||||
| 
 | ||||
| ```html | ||||
| <!-- sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com --> | ||||
| <template><div> | ||||
|   <div v-for="item in data.data" v-bind:key="item.name"> | ||||
|     <h2>{{ item.name }}</h2> | ||||
|  | ||||
| @ -141,7 +141,7 @@ func new --template "Http Trigger" --name SheetJSAzure | ||||
| 4) Replace `SheetJSAzure/index.js` with the following: | ||||
| 
 | ||||
| ```js title="SheetJSAzure/index.js" | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| const XLSX = require('xlsx'); | ||||
| const formidable = require('formidable'); | ||||
| const Readable = require('stream').Readable; | ||||
|  | ||||
| @ -25,7 +25,7 @@ to read files from the filesystem with `Deno.readFileSync`. | ||||
| 1) Save the following script to `sheet2csv.ts`: | ||||
| 
 | ||||
| ```ts title="sheet2csv.ts" | ||||
| /*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /*! sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| // @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts" | ||||
| import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs'; | ||||
| import * as cptable from 'https://cdn.sheetjs.com/xlsx-latest/package/dist/cpexcel.full.mjs'; | ||||
|  | ||||
| @ -103,7 +103,7 @@ mv duktape-2.7.0/src/*.{c,h} . | ||||
| 2) Save the following script to `sheetjs.duk.c`: | ||||
| 
 | ||||
| ```c title="sheetjs.duk.c" | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| @ -417,7 +417,7 @@ var console = { log: function(x) { print(x); } }; | ||||
| - `hermes.js` will call `XLSX.read` and `XLSX.utils.sheet_to_csv`: | ||||
| 
 | ||||
| ```js title="hermes.js" | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| var wb = XLSX.read(payload, {type:'base64'}); | ||||
| console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]])); | ||||
| ``` | ||||
| @ -605,7 +605,7 @@ var console = { log: function(x) { print(x); } }; | ||||
| - `jerry.js` will call `XLSX.read` and `XLSX.utils.sheet_to_csv`: | ||||
| 
 | ||||
| ```js title="jerry.js" | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| var wb = XLSX.read(payload, {type:'base64'}); | ||||
| console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]])); | ||||
| ``` | ||||
| @ -648,7 +648,7 @@ the standalone browser scripts. | ||||
| 2) Save the following script to `SheetJSQuick.js`: | ||||
| 
 | ||||
| ```js title="SheetJSQuick.js | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| /* load XLSX */ | ||||
| import * as std from "std"; | ||||
| globalThis.global = globalThis; | ||||
| @ -707,7 +707,7 @@ context.setOptimizationLevel(-1); | ||||
| 2) Save the following code to `SheetJSRhino.java`: | ||||
| 
 | ||||
| ```java title="SheetJSRhino.java" | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| /* vim: set ts=2: */ | ||||
| import com.sheetjs.SheetJS; | ||||
| import com.sheetjs.SheetJSFile; | ||||
| @ -821,7 +821,7 @@ var global = (function(){ return this; }).call(null); | ||||
| - `chakra.js` will call `XLSX.read` and `XLSX.utils.sheet_to_csv`: | ||||
| 
 | ||||
| ```js title="chakra.js" | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| var wb = XLSX.read(payload, {type:'base64'}); | ||||
| console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]])); | ||||
| ``` | ||||
| @ -883,7 +883,7 @@ array and calls `XLSX.read` with type `"array"`. | ||||
| 2) Save the following script to `SheetJSNashorn.js`: | ||||
| 
 | ||||
| ```js title="SheetJSNashorn.js" | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| 
 | ||||
| /* load module */ | ||||
| var global = (function(){ return this; }).call(null); | ||||
|  | ||||
| @ -144,7 +144,7 @@ class WriteResource extends Drash.Resource { | ||||
| 1) Save the following script to `SheetJSDrash.ts`: | ||||
| 
 | ||||
| ```ts title="SheetJSDrash.ts" | ||||
| /*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /*! sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| // @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts" | ||||
| import { read, utils, set_cptable } from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs'; | ||||
| import * as cptable from 'https://cdn.sheetjs.com/xlsx-latest/package/dist/cpexcel.full.mjs'; | ||||
|  | ||||
| @ -210,7 +210,7 @@ Open `SheetJSRedis.xlsx` and verify the columns have the correct data | ||||
| ### PouchDB | ||||
| 
 | ||||
| `Database#allDocs` is the standard approach for bulk data export. The generated | ||||
| row objects have an additional `_id` and `_rev` keys that should be removed. | ||||
| row objects have additional `_id` and `_rev` keys that should be removed. | ||||
| 
 | ||||
| Nested objects must be flattened. The ["Tutorial"](../getting-started/example) | ||||
| includes an example of constructing a simple array. | ||||
|  | ||||
| @ -65,7 +65,7 @@ demo pages should be downloaded and hosted using a simple HTTP server. | ||||
| 
 | ||||
| ::: | ||||
| 
 | ||||
| <http://oss.sheetjs.com/sheetjs/ajax.html> uses XMLHttpRequest to download test | ||||
| <https://oss.sheetjs.com/sheetjs/ajax.html> uses XMLHttpRequest to download test | ||||
| files and convert to CSV | ||||
| 
 | ||||
| <https://oss.sheetjs.com/sheetjs/> demonstrates reading files with `FileReader`. | ||||
|  | ||||
| @ -396,7 +396,7 @@ For modern websites targeting Chrome 42+, `fetch` is recommended: | ||||
| // XLSX is a global from the standalone script | ||||
| 
 | ||||
| (async() => { | ||||
|   const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
|   const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
|   const data = await (await fetch(url)).arrayBuffer(); | ||||
|   /* data is an ArrayBuffer */ | ||||
|   const workbook = XLSX.read(data); | ||||
| @ -408,7 +408,7 @@ For modern websites targeting Chrome 42+, `fetch` is recommended: | ||||
| For broader support, the `XMLHttpRequest` approach is recommended: | ||||
| 
 | ||||
| ```js | ||||
| var url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| var url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| 
 | ||||
| /* set up async GET request */ | ||||
| var req = new XMLHttpRequest(); | ||||
| @ -426,7 +426,7 @@ req.send(); | ||||
| 
 | ||||
| The [`xhr` demo](../demos/network) includes a longer discussion and more examples. | ||||
| 
 | ||||
| <http://oss.sheetjs.com/sheetjs/ajax.html> shows fallback approaches for IE6+. | ||||
| <https://oss.sheetjs.com/sheetjs/ajax.html> shows fallback approaches for IE6+. | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="nodejs" label="NodeJS"> | ||||
| @ -436,7 +436,7 @@ Node 17.5 and 18.0 have native support for fetch: | ||||
| ```js | ||||
| const XLSX = require("xlsx"); | ||||
| 
 | ||||
| const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const data = await (await fetch(url)).arrayBuffer(); | ||||
| /* data is an ArrayBuffer */ | ||||
| const workbook = XLSX.read(data); | ||||
| @ -450,7 +450,7 @@ For broader compatibility, third-party modules are recommended. | ||||
| var XLSX = require("xlsx"); | ||||
| var request = require("request"); | ||||
| 
 | ||||
| var url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| var url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| request({url: url, encoding: null}, function(err, resp, body) { | ||||
|   var workbook = XLSX.read(body); | ||||
| 
 | ||||
| @ -464,7 +464,7 @@ request({url: url, encoding: null}, function(err, resp, body) { | ||||
| const XLSX = require("xlsx"); | ||||
| const axios = require("axios"); | ||||
| 
 | ||||
| const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| (async() => { | ||||
|   const res = await axios.get(url, {responseType: "arraybuffer"}); | ||||
|   /* res.data is a Buffer */ | ||||
| @ -485,7 +485,7 @@ import * as XLSX from 'xlsx/xlsx.mjs'; | ||||
| import * as cptable from 'xlsx/dist/cpexcel.full.mjs'; | ||||
| XLSX.set_cptable(cptable); | ||||
| 
 | ||||
| const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| // highlight-next-line | ||||
| const data = await (await fetch(url)).arrayBuffer(); | ||||
| /* data is an ArrayBuffer */ | ||||
| @ -504,7 +504,7 @@ import * as XLSX from 'https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs' | ||||
| import * as cptable from 'https://cdn.sheetjs.com/xlsx-${current}/package/dist/cpexcel.full.mjs'; | ||||
| XLSX.set_cptable(cptable); | ||||
| 
 | ||||
| const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| // highlight-next-line | ||||
| const data = await (await fetch(url)).arrayBuffer(); | ||||
| /* data is an ArrayBuffer */ | ||||
| @ -530,7 +530,7 @@ resources.  Responses should be manually concatenated using `Buffer.concat`: | ||||
| const XLSX = require("xlsx"); | ||||
| const { net } = require("electron"); | ||||
| 
 | ||||
| const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const url = "https://oss.sheetjs.com/test_files/formula_stress_test.xlsx"; | ||||
| const req = net.request(url); | ||||
| req.on("response", (res) => { | ||||
|   const bufs = []; // this array will collect all of the buffers | ||||
|  | ||||
| @ -374,7 +374,56 @@ server.listen(port, hostname, () => { | ||||
|   </TabItem> | ||||
|   <TabItem value="deno" label="Deno"> | ||||
| 
 | ||||
| Deno responses are expected to be `Response` objects. `XLSX.write` with `buffer` | ||||
| type returns `Uint8Array` objects that can be used in the `Response`. | ||||
| 
 | ||||
| ```js | ||||
| /* generate Buffer */ | ||||
| const buf = XLSX.write(wb, { type:"buffer", bookType:"xlsx" }); | ||||
| /* return Response */ | ||||
| evt.respondWith(new Response(buf, { | ||||
|   status: 200, | ||||
|   headers: { | ||||
|     "Content-Type": "application/vnd.ms-excel", | ||||
|     "Content-Disposition": 'attachment; filename="SheetJSDeno.xlsx"' | ||||
|   } | ||||
| })); | ||||
| ``` | ||||
| 
 | ||||
| <details><summary><b>Complete Example</b> (click to show)</summary> | ||||
| 
 | ||||
| Save the following script to `deno.ts` and run with `deno run -A deno.ts`.  Open | ||||
| a web browser and access <http://localhost:7262> to download the workbook. | ||||
| 
 | ||||
| ```ts title="deno.ts" | ||||
| // @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts" | ||||
| import * as XLSX from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs'; | ||||
| 
 | ||||
| const wb = XLSX.utils.book_new(); | ||||
| XLSX.utils.book_append_sheet(wb, XLSX.utils.aoa_to_sheet([ | ||||
|   ["a","b","c"], [1,2,3] | ||||
| ]), "Sheet1"); | ||||
| 
 | ||||
| async function doNotAwaitThis(conn: Deno.Conn) { | ||||
|   for await (const e of Deno.serveHttp(conn)) e.respondWith(new Response( | ||||
|     XLSX.write(wb, {type:"buffer", bookType:"xlsx"}), | ||||
|     { | ||||
|       status: 200, | ||||
|       headers: { | ||||
|         "Content-Type": "application/vnd.ms-excel", | ||||
|         "Content-Disposition": 'attachment; filename="SheetJSDeno.xlsx"' | ||||
|       } | ||||
|     } | ||||
|   )); | ||||
| } | ||||
| 
 | ||||
| /* standard Deno web server */ | ||||
| const server = Deno.listen({ port: 7262 }); | ||||
| console.log(`HTTP webserver running.  Access it at:  http://localhost:7262/`); | ||||
| for await (const conn of server) doNotAwaitThis(conn); | ||||
| ``` | ||||
| 
 | ||||
| </details> | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="bun" label="Bun"> | ||||
|  | ||||
| @ -110,6 +110,40 @@ By default, operations run in the main renderer context and block the browser | ||||
| from updating. [Web Workers](../demos/worker) offload the hard work to separate | ||||
| contexts, freeing up the renderer to update. | ||||
| 
 | ||||
| #### Strange exported file names in the web browser | ||||
| 
 | ||||
| JS and the DOM API do not have a standard approach for creating files. There was | ||||
| a [`saveAs` proposal](https://www.w3.org/TR/2014/NOTE-file-writer-api-20140424/) | ||||
| but it was abandoned in 2014. | ||||
| 
 | ||||
| The library integrates a number of platform-specific techniques for different | ||||
| environments. In modern web browsers, the library uses the `download` attribute. | ||||
| 
 | ||||
| Third party libraries like [FileSaver](https://github.com/eligrey/FileSaver.js/) | ||||
| provide an implementation of `saveAs` and may help in some cases. | ||||
| 
 | ||||
| <details><summary><b>FileSaver.js integration</b> (click to show)</summary> | ||||
| 
 | ||||
| _Standalone Build_ | ||||
| 
 | ||||
| ```html | ||||
| <script src="https://unpkg.com/file-saver@2.0.5/dist/FileSaver.js"></script> | ||||
| <script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script> | ||||
| <!-- XLSX.writeFile will use the FileSaver `saveAs` implementation --> | ||||
| ``` | ||||
| 
 | ||||
| _Frameworks and Bundlers_ | ||||
| 
 | ||||
| At the time of writing, `file-saver@2.0.5` leaks `saveAs` to the global scope, | ||||
| so merely importing the module works: | ||||
| 
 | ||||
| ```js | ||||
| import FileSaver from 'file-saver'; // as a side effect, `saveAs` is visible | ||||
| import { writeFile } from 'xlsx'; // writeFile will use the global `saveAs` | ||||
| ``` | ||||
| 
 | ||||
| </details> | ||||
| 
 | ||||
| ## Data Issues | ||||
| 
 | ||||
| #### Generated XLSX files are very large! | ||||
|  | ||||
| @ -105,7 +105,7 @@ files snapshot from [the repo](https://github.com/SheetJS/test_files/releases) | ||||
| 
 | ||||
| #### Latest Snapshot | ||||
| 
 | ||||
| <http://github.com/SheetJS/test_files/releases/download/20170409/test_files.zip> | ||||
| <https://github.com/SheetJS/test_files/releases/download/20170409/test_files.zip> | ||||
| 
 | ||||
| (download and unzip to the `test_files` subfolder) | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html ng-app="s5s"> | ||||
| <head> | ||||
| @ -13,7 +13,7 @@ | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS + AngularJS demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS + AngularJS demo</a></b> | ||||
| 
 | ||||
| The core library can be used as-is in AngularJS applications. | ||||
| The <a href="https://docs.sheetjs.com">Community Edition README</a> details some common use cases. | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- SheetJS (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- SheetJS (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html ng-app="app"> | ||||
| <head> | ||||
| @ -25,7 +25,7 @@ | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS + AngularJS demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS + AngularJS demo</a></b> | ||||
| 
 | ||||
| The core library can be used as-is in AngularJS applications. | ||||
| The <a href="https://docs.sheetjs.com">Community Edition README</a> details some common use cases. | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| 'use strict'; | ||||
| var XLSX = require('xlsx'); | ||||
| var Busboy = require('busboy'); | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| var XLSX = require('xlsx'); | ||||
| /*jshint browser:true */ | ||||
| /*global require */ | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
| @ -23,7 +23,7 @@ a { text-decoration: none } | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS Data Preview Live Demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS Data Preview Live Demo</a></b> | ||||
| (Base64 text works back to IE6; drag and drop works back to IE10) | ||||
| 
 | ||||
| Output Format: <select name="format" onchange="setfmt()"> | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| var XLSX = require('xlsx'); | ||||
| 
 | ||||
| postMessage({t:"ready"}); | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
| @ -23,7 +23,7 @@ a { text-decoration: none } | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS + canvas-datagrid Demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS + canvas-datagrid Demo</a></b> | ||||
| 
 | ||||
| <div id="drop">Drop a spreadsheet file here to see sheet data</div> | ||||
| <input type="file" name="xlfile" id="xlf" /> ... or click here to select a file | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| var n = "xlsx"; | ||||
| var X = require('xlsx'); | ||||
| try { require('exit-on-epipe'); } catch(e) {} | ||||
| @ -74,7 +74,7 @@ program | ||||
| program.on('--help', function() { | ||||
|   console.log('  Default output format is CSV'); | ||||
|   console.log('  Support email: dev@sheetjs.com'); | ||||
|   console.log('  Web Demo: http://oss.sheetjs.com/js-'+n+'/'); | ||||
|   console.log('  Web Demo: https://oss.sheetjs.com/js-'+n+'/'); | ||||
| }); | ||||
| 
 | ||||
| /* flag, bookType, default ext */ | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| var electron = require('electron'); | ||||
| var XLSX = require('xlsx'); | ||||
| var app = electron.app; | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| /* vim: set ts=2: */ | ||||
| import { Component } from '@angular/core'; | ||||
| import { File } from '@ionic-native/file/ngx'; | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html ng-app="sjs"> | ||||
| <head> | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| import { utils } from 'xlsx'; | ||||
| import React, { Component } from 'react'; | ||||
| import { AppRegistry, StyleSheet, Text, Button, Alert, Image, ScrollView } from 'react-native'; | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html lang="en" style="height: 100%"> | ||||
| <body> | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html lang="en" style="height: 100%"> | ||||
| <head> | ||||
| @ -14,10 +14,10 @@ | ||||
|   <style>body, #app { height: 100%; }</style> | ||||
| </head> | ||||
| <body> | ||||
|   <div class="container-fluid"><h1><a href="http://sheetjs.com">SheetJS × React Demo</a></h1><br /></div> | ||||
|   <div class="container-fluid"><h1><a href="https://sheetjs.com">SheetJS × React Demo</a></h1><br /></div> | ||||
|   <div id="app" class="container-fluid"></div> | ||||
|   <script type="text/babel"> | ||||
|     /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
|     /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
|     /* Notes: | ||||
|        - usage: `ReactDOM.render( <SheetJSApp />, document.getElementById('app') );` | ||||
|        - xlsx.full.min.js is loaded in the head of the HTML page | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| import JavaScriptCore; | ||||
| 
 | ||||
| enum SJSError: Error { | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present  SheetJS -- https://sheetjs.com */ | ||||
| let sheetjs = try SheetJSCore(); | ||||
| 
 | ||||
| /* Print the SheetJS library version */ | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| /*jshint browser:true */ | ||||
| /*global XLSX */ | ||||
| var XLSX = require('xlsx'); | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
| @ -23,7 +23,7 @@ a { text-decoration: none } | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS Data Preview Live Demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS Data Preview Live Demo</a></b> | ||||
| (Base64 text works back to IE6; drag and drop works back to IE10) | ||||
| 
 | ||||
| Output Format: <select name="format" onchange="setfmt()"> | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| /*! sheetjs (C) SheetJS -- http://sheetjs.com */ | ||||
| /*! sheetjs (C) SheetJS -- https://sheetjs.com */ | ||||
| import { ref, onMounted } from "vue"; | ||||
| import VueTableLite from "vue3-table-lite/ts"; | ||||
| import { read, utils, WorkSheet, writeFile } from "xlsx"; | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| /* sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */ | ||||
| /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ | ||||
| var SheetJSFT = [ | ||||
|   "xlsx", "xlsb", "xlsm", "xls", "xml", "csv", "txt", "ods", "fods", "uos", "sylk", "dif", "dbf", "prn", "qpw", "123", "wb*", "wq*", "html", "htm", "numbers" | ||||
| ].map(function(x) { return "." + x; }).join(","); | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html lang="en" style="height: 100%"> | ||||
| <body> | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
| @ -22,7 +22,7 @@ | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS + VueJS2 demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS + VueJS2 demo</a></b> | ||||
| 
 | ||||
| This demo shows a sample Vue component "html-preview" that: | ||||
| - displays a file input that accepts a spreadsheet file | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) 2013-present  SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
| @ -22,7 +22,7 @@ | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS + VueJS3 demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS + VueJS3 demo</a></b> | ||||
| 
 | ||||
| This demo shows a sample Vue component "html-preview" that: | ||||
| - displays a file input that accepts a spreadsheet file | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <!DOCTYPE html> | ||||
| <!-- sheetjs (C) SheetJS http://sheetjs.com --> | ||||
| <!-- sheetjs (C) SheetJS https://sheetjs.com --> | ||||
| <!-- vim: set ts=2: --> | ||||
| <html> | ||||
| <head> | ||||
| @ -25,7 +25,7 @@ a { text-decoration: none } | ||||
| </head> | ||||
| <body> | ||||
| <pre> | ||||
| <b><a href="http://sheetjs.com">SheetJS + x-spreadsheet Demo</a></b> | ||||
| <b><a href="https://sheetjs.com">SheetJS + x-spreadsheet Demo</a></b> | ||||
| 
 | ||||
| <div id="drop">Drop a spreadsheet file here to see sheet data</div> | ||||
| <input type="file" name="xlfile" id="xlf" /> ... or click here to select a file | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user