diff --git a/docz/docs/02-getting-started/01-installation/04-amd.md b/docz/docs/02-getting-started/01-installation/04-amd.md index 68d12c0c..3f098424 100644 --- a/docz/docs/02-getting-started/01-installation/04-amd.md +++ b/docz/docs/02-getting-started/01-installation/04-amd.md @@ -36,18 +36,34 @@ new versions are released! ## NetSuite -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: +After downloading the script and uploading to the file cabinet, a module alias +must be added to the `@NAmdConfig` configuration file: -```js -define(['N/file', './xlsx.full.min'], function(file, XLSX) { - // ... use XLSX here -}) +```json title="JsLibraryConfig.json" +{ + "paths": { + // highlight-next-line + "xlsx": "/path/to/xlsx.full.min" + } +} ``` -As explained in the [NetSuite demo](/docs/demos/cloud/netsuite), module aliases -can be created in config files referenced via `@NAmdConfig` comments. +Once added, SuiteScripts can reference the package using the name `xlsx`: + +```js title="SuiteScript" +/** + * @NApiVersion 2.x + * ... more options ... + // highlight-next-line + * @NAmdConfig ./JsLibraryConfig.json + */ +// highlight-next-line +define(['N/file', 'xlsx'], function(file, XLSX) { + // ... use XLSX here ... +}); +``` + +**More details are included in the [NetSuite demo](/docs/demos/cloud/netsuite#installation)** ## SAP UI5 diff --git a/docz/docs/03-demos/01-math/index.md b/docz/docs/03-demos/01-math/index.md index 3627862f..bb097fb2 100644 --- a/docz/docs/03-demos/01-math/index.md +++ b/docz/docs/03-demos/01-math/index.md @@ -7,6 +7,8 @@ pagination_next: demos/frontend/index import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; +Each valid number in Excel can be represented as an "IEEE754 double"[^1]. + With full support for IEEE754 doubles and singles, JavaScript is an excellent language for mathematics and statistical analysis. It has also proven to be a viable platform for machine learning. @@ -88,8 +90,8 @@ entries will be converted to quiet `NaN` values. #### Extracting Worksheet Data -The SheetJS `sheet_to_json`[^1] method with the option `header: 1`[^2] generates -an array of arrays from a worksheet object. The result is in row-major order: +The SheetJS `sheet_to_json`[^2] method with the option `header: 1` generates an +array of arrays from a worksheet object. The result is in row-major order: ```js const aoa = XLSX.utils.sheet_to_json(worksheet, {header: 1}); @@ -247,9 +249,9 @@ const petal_length = Float64Array.from(aoa[2].slice(1)); ### Writing to Sheets -The SheetJS `aoa_to_sheet`[^1] method can generate a worksheet from an array of -arrays. Similarly, `sheet_add_aoa`[^2] can add an array of arrays of data into -an existing worksheet object. The `origin` option[^3] controls where data will +The SheetJS `aoa_to_sheet`[^3] method can generate a worksheet from an array of +arrays. Similarly, `sheet_add_aoa`[^4] can add an array of arrays of data into +an existing worksheet object. The `origin` option[^5] controls where data will be written in the worksheet. Neither method understands typed arrays, so data columns must be converted to @@ -407,6 +409,8 @@ function SheetJSeriesToCols() { return (