From 17850ebbd357f1d69dc42472d39da1fcc3881338 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Tue, 8 Nov 2022 00:43:21 -0500 Subject: [PATCH] nuxt refresh --- docz/docs/02-getting-started/02-example.mdx | 14 ++- docz/docs/03-demos/04-grid.md | 129 +++++++++----------- docz/docs/03-demos/06-content.md | 37 +++--- docz/docs/03-demos/23-netsuite.md | 2 +- docz/docs/03-demos/26-excelapi.md | 13 +- docz/docs/03-demos/45-git.md | 11 +- docz/docs/06-solutions/01-input.md | 15 +-- 7 files changed, 111 insertions(+), 110 deletions(-) diff --git a/docz/docs/02-getting-started/02-example.mdx b/docz/docs/02-getting-started/02-example.mdx index ff66e08..471c72b 100644 --- a/docz/docs/02-getting-started/02-example.mdx +++ b/docz/docs/02-getting-started/02-example.mdx @@ -13,7 +13,7 @@ The discussion focuses on the problem solving mindset. API details are covered in other parts of the documentation. The goal of this example is to generate a XLSX workbook of US President names -and birthdays. [Click here](#live-demo) to jump to the live demo +and birthdays. [Click here](#live-demo) to jump to the live demo. ## Acquire Data @@ -22,7 +22,14 @@ and birthdays. [Click here](#live-demo) to jump to the live demo [The raw data is available in JSON form](https://theunitedstates.io/congress-legislators/executive.json). For convenience, it has been [mirrored here](https://sheetjs.com/data/executive.json) -The data result is an Array of objects. This is the data for John Adams: +Acquiring the data is straightforward with `fetch`: + +```js +const url = "https://sheetjs.com/data/executive.json"; +const raw_data = await (await fetch(url)).json(); +``` + +The raw data is an Array of objects. This is the data for John Adams: ```js { @@ -165,6 +172,9 @@ XLSX.writeFile(workbook, "Presidents.xlsx", { compression: true }); ## Live Demo +This demo runs in the web browser! Click "Click to Generate File!" and the +browser should generate a XLSX file. + ```jsx live function Presidents() { return (