diff --git a/docz/docs/02-getting-started/01-installation/06-deno.md b/docz/docs/02-getting-started/01-installation/06-deno.md index c45e063..922dc01 100644 --- a/docz/docs/02-getting-started/01-installation/06-deno.md +++ b/docz/docs/02-getting-started/01-installation/06-deno.md @@ -92,7 +92,8 @@ The official Deno registry is out of date. This is a registry bug. ::: -Applications using the Deno registry can migrate by changing the URLs. +Applications using the Deno registry can migrate by changing the URLs. After +migrating, it is easy to update by changing the version number. diff --git a/docz/docs/03-demos/25-gsheet.md b/docz/docs/03-demos/25-gsheet.md index 0a746eb..c5665dc 100644 --- a/docz/docs/03-demos/25-gsheet.md +++ b/docz/docs/03-demos/25-gsheet.md @@ -5,8 +5,7 @@ title: Google Sheets import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -This demo uses [`node-google-spreadsheet`](https://theoephraim.github.io/node-google-spreadsheet) -to interact with Google Sheets v4 API. +This demo uses `node-google-spreadsheet` to interact with Google Sheets v4 API. :::caution @@ -57,13 +56,7 @@ not natively support the XLSB format. SheetJS fills the gap.
How to run locally (click to show) -0) Follow the [Authentication and Service Account](https://theoephraim.github.io/node-google-spreadsheet/#/getting-started/authentication) -instructions. At the end, you should have - -- Created a project and enabled the Sheets API -- Created a service account with a JSON key - -Move the generated JSON key to `key.json` in your project folder. +0) Follow the [Initial Configuration](#initial-configuration). 1) Create a new Google Sheet and share with the generated service account. It should be granted the "Editor" role @@ -195,13 +188,7 @@ The goal is to refresh a Google Sheet based on a local file.
How to run locally (click to show) -0) Follow the [Authentication and Service Account](https://theoephraim.github.io/node-google-spreadsheet/#/getting-started/authentication) -instructions. At the end, you should have - -- Created a project and enabled the Sheets API -- Created a service account with a JSON key - -Move the generated JSON key to `key.json` in your project folder. +0) Follow the [Initial Configuration](#initial-configuration). 1) Create a new Google Sheet and share with the generated service account. It should be granted the "Editor" role diff --git a/docz/docs/03-demos/31-engines.md b/docz/docs/03-demos/31-engines.md index 5dda32b..7a0e650 100644 --- a/docz/docs/03-demos/31-engines.md +++ b/docz/docs/03-demos/31-engines.md @@ -647,7 +647,7 @@ the standalone browser scripts. 2) Save the following script to `SheetJSQuick.js`: -```js title="SheetJSQuick.js +```js title="SheetJSQuick.js" /* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */ /* load XLSX */ import * as std from "std"; @@ -664,10 +664,10 @@ rh.read(ab, 0, sz); rh.close(); /* parse file */ -var wb = XLSX.read(ab, {type: 'array'}); +var wb = XLSX.read(ab); -/* write array */ -var out = XLSX.write(wb, {type: 'array'}); +/* write XLSX */ +var out = XLSX.write(wb, {bookType: "xlsx", type: "array"}); /* write contents to file */ var wh = std.open("SheetJSQuick.xlsx", "wb"); @@ -861,6 +861,7 @@ The `load` function in `jjs` can load the minified source directly: ```js var global = (function(){ return this; }).call(null); +load('shim.min.js'); load('xlsx.full.min.js'); ``` @@ -887,6 +888,7 @@ array and calls `XLSX.read` with type `"array"`. /* load module */ var global = (function(){ return this; }).call(null); +load('shim.min.js'); load('xlsx.full.min.js'); /* helper to convert byte array to plain JS array */ @@ -905,7 +907,7 @@ function process_file(path) { var u8a = b2a(bytes); /* read data */ - var wb = XLSX.read(u8a, {type:"array"}); + var wb = XLSX.read(u8a); /* get first worksheet as an array of arrays */ var ws = wb.Sheets[wb.SheetNames[0]]; diff --git a/docz/docs/03-demos/35-server.md b/docz/docs/03-demos/35-server.md index 7eb189f..2417ea2 100644 --- a/docz/docs/03-demos/35-server.md +++ b/docz/docs/03-demos/35-server.md @@ -100,7 +100,7 @@ class ParseResource extends Drash.Resource { const file = request.bodyParam("upload"); if (!file) throw new Error("File is required!"); // highlight-next-line - var wb = read(file.content, {type: "buffer"}); + var wb = read(file.content); return response.html( utils.sheet_to_html(wb.Sheets[wb.SheetNames[0]])); } } @@ -156,7 +156,7 @@ class ParseResource extends Drash.Resource { public POST(request: Drash.Request, response: Drash.Response) { const file = request.bodyParam("file"); if (!file) throw new Error("File is required!"); - var wb = read(file.content, {type: "buffer"}); + var wb = read(file.content); return response.html( utils.sheet_to_html(wb.Sheets[wb.SheetNames[0]])); } diff --git a/docz/docs/03-demos/44-legacy.md b/docz/docs/03-demos/44-legacy.md index b1789e2..a2cd5a1 100644 --- a/docz/docs/03-demos/44-legacy.md +++ b/docz/docs/03-demos/44-legacy.md @@ -13,9 +13,9 @@ SheetJS libraries strive to maintain broad browser and JS engine compatibility. ## Integration -The ["Standalone Browser Scripts"](/docs/getting-started/installation/standalone) section has -instructions for obtaining or referencing the standalone scripts. These are -designed to be referenced with `