diff --git a/Makefile b/Makefile index 52cbdd1..2b444dd 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,10 @@ build: mv docz/build/ docs cp CNAME docs +.PHONY: server +serve: + cd docs; python -mSimpleHTTPServer; cd - + .PHONY: index index: readme ## Rebuild site sed -i .bak 's/](d/](https:\/\/github.com\/SheetJS\/SheetJS\/tree\/master\/d/g' README.md diff --git a/docz/blog/2019-05-28-first-blog-post.md b/docz/blog/2019-05-28-first-blog-post.md deleted file mode 100644 index 02f3f81..0000000 --- a/docz/blog/2019-05-28-first-blog-post.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -slug: first-blog-post -title: First Blog Post -authors: - name: Gao Wei - title: Docusaurus Core Team - url: https://github.com/wgao19 - image_url: https://github.com/wgao19.png -tags: [hola, docusaurus] ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/docz/blog/2019-05-29-long-blog-post.md b/docz/blog/2019-05-29-long-blog-post.md deleted file mode 100644 index 26ffb1b..0000000 --- a/docz/blog/2019-05-29-long-blog-post.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: long-blog-post -title: Long Blog Post -authors: endi -tags: [hello, docusaurus] ---- - -This is the summary of a very long blog post, - -Use a `` comment to limit blog post size in the list view. - - - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/docz/blog/2021-08-01-mdx-blog-post.mdx b/docz/blog/2021-08-01-mdx-blog-post.mdx deleted file mode 100644 index c04ebe3..0000000 --- a/docz/blog/2021-08-01-mdx-blog-post.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: mdx-blog-post -title: MDX Blog Post -authors: [slorber] -tags: [docusaurus] ---- - -Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). - -:::tip - -Use the power of React to create interactive blog posts. - -```js - -``` - - - -::: diff --git a/docz/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg b/docz/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg deleted file mode 100644 index 11bda09..0000000 Binary files a/docz/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg and /dev/null differ diff --git a/docz/blog/2021-08-26-welcome/index.md b/docz/blog/2021-08-26-welcome/index.md deleted file mode 100644 index 9455168..0000000 --- a/docz/blog/2021-08-26-welcome/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: welcome -title: Welcome -authors: [slorber, yangshun] -tags: [facebook, hello, docusaurus] ---- - -[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog). - -Simply add Markdown files (or folders) to the `blog` directory. - -Regular blog authors can be added to `authors.yml`. - -The blog post date can be extracted from filenames, such as: - -- `2019-05-30-welcome.md` -- `2019-05-30-welcome/index.md` - -A blog post folder can be convenient to co-locate blog post images: - -![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg) - -The blog supports tags as well! - -**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config. diff --git a/docz/blog/authors.yml b/docz/blog/authors.yml deleted file mode 100644 index bcb2991..0000000 --- a/docz/blog/authors.yml +++ /dev/null @@ -1,17 +0,0 @@ -endi: - name: Endilie Yacop Sucipto - title: Maintainer of Docusaurus - url: https://github.com/endiliey - image_url: https://github.com/endiliey.png - -yangshun: - name: Yangshun Tay - title: Front End Engineer @ Facebook - url: https://github.com/yangshun - image_url: https://github.com/yangshun.png - -slorber: - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png diff --git a/docz/docs/07-csf/07-features.md b/docz/docs/07-csf/07-features.md index 6ec46bb..82ca1b6 100644 --- a/docz/docs/07-csf/07-features.md +++ b/docz/docs/07-csf/07-features.md @@ -622,6 +622,15 @@ There is no Active Directory or Office 365 metadata associated with authors in a ## Sheet Visibility +
+ Format Support (click to show) + +**Hidden Sheets**: XLSX/M, XLSB, BIFF8/BIFF5 XLS, XLML + +**Very Hidden Sheets**: XLSX/M, XLSB, BIFF8/BIFF5 XLS, XLML + +
+ Excel enables hiding sheets in the lower tab bar. The sheet data is stored in the file but the UI does not readily make it available. Standard hidden sheets are revealed in the "Unhide" menu. Excel also has "very hidden" sheets which @@ -629,29 +638,77 @@ cannot be revealed in the menu. It is only accessible in the VB Editor! The visibility setting is stored in the `Hidden` property of sheet props array. -
- More details (click to show) +| Value | Definition | VB Editor "Visible" Property | +|:-----:|:------------|:-----------------------------| +| 0 | Visible | `-1 - xlSheetVisible` | +| 1 | Hidden | ` 0 - xlSheetHidden` | +| 2 | Very Hidden | ` 2 - xlSheetVeryHidden` | -| Value | Definition | -|:-----:|:------------| -| 0 | Visible | -| 1 | Hidden | -| 2 | Very Hidden | +If the respective Sheet entry does not exist or if the `Hidden` property is not +set, the worksheet is visible. -With : +**List all worksheets and their visibilities** ```js -> wb.Workbook.Sheets.map(function(x) { return [x.name, x.Hidden] }) -[ [ 'Visible', 0 ], [ 'Hidden', 1 ], [ 'VeryHidden', 2 ] ] +wb.Workbook.Sheets.map(function(x) { return [x.name, x.Hidden] }) +// [ [ 'Visible', 0 ], [ 'Hidden', 1 ], [ 'VeryHidden', 2 ] ] ``` +**Check if worksheet is visible** + Non-Excel formats do not support the Very Hidden state. The best way to test if a sheet is visible is to check if the `Hidden` property is logical truth: ```js -> wb.Workbook.Sheets.map(function(x) { return [x.name, !x.Hidden] }) -[ [ 'Visible', true ], [ 'Hidden', false ], [ 'VeryHidden', false ] ] +wb.Workbook.Sheets.map(function(x) { return [x.name, !x.Hidden] }) +// [ [ 'Visible', true ], [ 'Hidden', false ], [ 'VeryHidden', false ] ] ``` + +
+ Live Example (click to show) + + +[This test file](pathname:///files/sheet_visibility.xlsx) has three sheets: + +- "Visible" is visible +- "Hidden" is hidden +- "VeryHidden" is very hidden + +![Screenshot](pathname:///files/sheet_visibility.png) + +**Live demo** + +```jsx live +function Visibility(props) { + const [sheets, setSheets] = React.useState([]); + const names = [ "Visible", "Hidden", "Very Hidden" ]; + + React.useEffect(async() => { + const f = await fetch("/files/sheet_visibility.xlsx"); + const ab = await f.arrayBuffer(); + const wb = XLSX.read(ab); + + /* State will be set to the `Sheets` property array */ + setSheets(wb.Workbook.Sheets); + }, []); + + return ( + + {sheets.map((x,i) => ( + + + + + + + + ))}
NameValueHidden
{x.name}{x.Hidden} - {names[x.Hidden]}{!x.Hidden ? "No" : "Yes"}
); +} + +``` + + +
## VBA and Macros diff --git a/docz/docs/index.md b/docz/docs/index.md index 8f4df66..45e8f57 100644 --- a/docz/docs/index.md +++ b/docz/docs/index.md @@ -151,7 +151,7 @@ function Numbers2HTML(props) { /* Generate HTML */ setHTML(XLSX.utils.sheet_to_html(ws)); - }); + }, []); return (
); } diff --git a/docz/static/files/sheet_visibility.png b/docz/static/files/sheet_visibility.png new file mode 100644 index 0000000..2734cec Binary files /dev/null and b/docz/static/files/sheet_visibility.png differ diff --git a/docz/static/files/sheet_visibility.xlsx b/docz/static/files/sheet_visibility.xlsx new file mode 100644 index 0000000..a64e69b Binary files /dev/null and b/docz/static/files/sheet_visibility.xlsx differ diff --git a/docz/version.js b/docz/version.js index 6453a5d..858b223 100644 --- a/docz/version.js +++ b/docz/version.js @@ -1,2 +1,2 @@ -const current = "0.18.7"; +const current = "0.18.8"; export default current;