import-example

This commit is contained in:
SheetJS 2023-07-26 16:18:07 -04:00
parent 67612ae920
commit 01059494e2
23 changed files with 1077 additions and 28 deletions

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 1
sidebar_custom_props:
summary: Classic pages with simple <script> tags

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 2
sidebar_custom_props:
summary: Angular, React, VueJS, Webpack, etc.

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 3
sidebar_custom_props:
summary: Server-side and other frameworks using NodeJS modules

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 4
sidebar_custom_props:
summary: NetSuite, SAP UI5, RequireJS
@ -36,8 +36,9 @@ new versions are released!
## NetSuite
After uploading the script to the File Cabinet, it can be referenced directly in
`define` calls in SuiteScripts:
After adding to the File Cabinet, scripts can be referenced in `define` calls
in SuiteScripts. For example, if the `xlsx.full.min.js` script is placed in the
same folder as the SuiteScript, the relative import `"./xlsx.full.min"` works:
```js
define(['N/file', './xlsx.full.min'], function(file, XLSX) {
@ -168,4 +169,4 @@ require(["xlsx"], function(_XLSX) {
// ... use XLSX here
});
</script>`}
</CodeBlock>
</CodeBlock>

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 5
sidebar_custom_props:
summary: Photoshop, InDesign, and other Creative Cloud apps

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 6
sidebar_custom_props:
summary: Import ECMAScript Modules and TypeScript definitions

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
sidebar_position: 7
sidebar_custom_props:
summary: Download and Import ECMAScript Modules

@ -1,6 +1,6 @@
---
pagination_prev: getting-started/index
pagination_next: getting-started/example
pagination_next: getting-started/examples/index
hide_table_of_contents: true
title: Installation
------

@ -1,5 +1,6 @@
---
pagination_prev: getting-started/installation/index
pagination_next: getting-started/roadmap
sidebar_position: 2
---
@ -8,14 +9,11 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
# Tutorial
# Export Tutorial
SheetJS presents a simple JS interface that works with "Array of Arrays" and
"Array of JS Objects". The API functions are building blocks that should be
combined with other JS APIs to solve problems.
The discussion focuses on the problem solving mindset. API details are covered
in other parts of the documentation.
Many modern data sources provide an API to download data in JSON format. Many
users prefer to work in spreadsheet software. SheetJS libraries help bridge the
gap by translating programmer-friendly JSON to user-friendly workbooks.
The goal of this example is to generate a XLSX workbook of US President names
and birthdates. We will download and wrangle a JSON dataset using standard

File diff suppressed because it is too large Load Diff

@ -0,0 +1,5 @@
{
"label": "Tutorials",
"collapsed": false,
"position": 2
}

@ -0,0 +1,26 @@
---
pagination_prev: getting-started/installation/index
pagination_next: getting-started/roadmap
---
# Tutorials
SheetJS presents a simple JS interface that works with "Array of Arrays" and
"Array of JS Objects". The API functions are building blocks that should be
combined with other JS APIs to solve problems.
These discussions focus on the problem solving mindset. API details are covered
in other parts of the documentation.
## Data Export
The ["Export Tutorial"](/docs/getting-started/examples/export) examines the data
export process. Raw data is fetched from an endpoint, processed and ultimately
exported to a XLSX spreadsheet.
## Data Import
The ["Import Tutorial"](/docs/getting-started/examples/import) examines the data
import process. A legacy file is downloaded and parsed. The underlying data is
ultimately displayed to the user in a HTML table.

@ -1,4 +1,5 @@
---
pagination_prev: getting-started/examples/index
sidebar_position: 3
---

@ -8,8 +8,11 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
# Getting Started
["Tutorial"](/docs/getting-started/example) is a live example that covers
general data munging and data export to spreadsheets.
["Export Tutorial"](/docs/getting-started/examples/export) is a live example
that covers general data munging and data export to spreadsheets.
["Import Tutorial"](/docs/getting-started/examples/import) is a live example
that covers data import from spreadsheets and data processing.
["Demos"](/docs/demos) include discussions and tested examples for common
deployments and use cases.

@ -212,7 +212,7 @@ require(["dojo/request/xhr", "xlsx"], function(xhr, _XLSX) {
</details>
The ["Dojo" section in "Bundlers"](/docs/demos/bundler#dojo) includes a complete example
mirroring the [official export example](/docs/getting-started/example)
mirroring the [official export example](/docs/getting-started/examples/export)
<details><summary><b>Details</b> (click to show)</summary>

@ -16,7 +16,7 @@ PouchDB is a pure JS database with built-in synchronization features.
`Database#allDocs` is the standard approach for bulk data export. The generated
row objects have additional `_id` and `_rev` keys that should be removed.
Nested objects must be flattened. The ["Export Tutorial"](/docs/getting-started/example)
Nested objects must be flattened. The ["Export Tutorial"](/docs/getting-started/examples/export)
includes an example of constructing a simple array.
```js

@ -120,7 +120,7 @@ This string can be loaded into the JS engine and processed:
:::note
This demo was tested on 2023 May 28 using Rhino 1.7.14.
This demo was tested on 2023-07-26 using Rhino 1.7.14.
:::

@ -735,7 +735,7 @@ the function and the optional `opts` argument in more detail.
#### Examples
["Export Tutorial"](/docs/getting-started/example) contains a detailed
["Export Tutorial"](/docs/getting-started/examples/export) contains a detailed
example of fetching data from a JSON Endpoint and generating a workbook.
[`x-spreadsheet`](/docs/demos/grid/xs) is an interactive data grid for

@ -105,8 +105,8 @@ const config = {
to: '/docs',
},
{
label: 'Example',
to: '/docs/getting-started/example/',
label: 'Examples',
to: '/docs/getting-started/examples',
},
],
},
@ -173,7 +173,8 @@ const config = {
require.resolve("@cmfcmf/docusaurus-search-local"),
[ '@docusaurus/plugin-client-redirects', {
redirects: [
{ from: '/docs/example', to: '/docs/getting-started/example' },
{ from: '/docs/example', to: '/docs/getting-started/examples/export/' },
{ from: '/docs/getting-started/example', to: '/docs/getting-started/examples/export/' },
{ from: '/docs/installation', to: '/docs/getting-started/' },
{ from: '/docs/interface', to: '/docs/api/' },
{ from: '/docs/demos/excel', to: '/docs/demos/' },

@ -36,7 +36,7 @@ const FeatureList = [
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/getting-started/example">
to="/docs/getting-started/examples/export">
Complete Example
</Link>
</div>

Binary file not shown.

BIN
docz/static/import/1316.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
docz/static/sl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB