SheetJS Community Edition Docs repo https://docs.sheetjs.com
Go to file
2024-01-03 01:47:00 -05:00
docz math 2024-01-03 01:47:00 -05:00
misc WPS 电子表格 2022-10-20 20:10:10 -04:00
_headers content-type 2023-09-02 05:26:57 -04:00
.gitattributes excel javascript api 2022-05-30 22:53:56 -04:00
.gitignore math 2024-01-03 01:47:00 -05:00
.spelling eleventy 2023-05-07 09:58:36 -04:00
CNAME Create CNAME 2020-01-27 23:39:02 -05:00
formats.png WPS 电子表格 2022-10-20 20:10:10 -04:00
index.html 0.18.7 2022-05-11 17:03:03 -04:00
legend.png WPS 电子表格 2022-10-20 20:10:10 -04:00
Makefile chakra-linux 2023-07-06 03:21:41 -04:00
package.json chakra-linux 2023-07-06 03:21:41 -04:00
README.md percentage 2023-09-11 02:53:53 -04:00

SheetJS CE Docs

Hosted URL: https://docs.sheetjs.com

Development

The site source code is in the docz folder. make builds the static site and moves the generated pages and scripts to the docs folder.

docz/version.js exports a version number for use in docs pages.

Build Commands

$ make init    # install dependencies
$ make         # build static site
$ make serve   # serve static site

$ make dev     # run dev server
$ make spell   # spell check (.spelling custom dictionary)
$ make graph   # build format graph and legend

Formats Graph

The formats graph and legend are written in the DOT language. Rebuilding the graphs will require Graphviz (brew install graphviz on macOS)

Live Demos

https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js is loaded on each page, making the XLSX variable available to live blocks.

Page-Specific Scripts

Imports do not work from live codeblocks!

Docusaurus does not have an official recommendation for this workflow.

Specific pages can load scripts using the head component:

<head>
  <script src="https://cdn.sheetjs.com/xspreadsheet/xlsxspread.min.js"></script>
</head>

Adding scripts through head is known to be brittle!

Live codeblocks that use external libraries in useEffect hooks should check before using variables. For example, the Dropbox live demo tests if Dropbox is defined before proceeding. If it is not defined, a message is displayed.

function SheetJSTestDropbox() {
  const [msg, setMsg] = React.useState("Dropbox is defined");

  React.useEffect(() => {
    if(typeof Dropbox == "undefined") return setMsg("Dropbox is not defined");
  }, []);
  return ( <b>{msg}</b> );
}

Other Notes

src/theme/Admonition was swizzled from 2.4.1 to enable pass for hiding header text. See Docusaurus issue 8568 for more details.

src/theme/prism-include-languages.js was swizzled from 2.4.1 to support the Liquid language. See Docusaurus issue 6872 for more details.