https://github.com/xuri/excelize-wasm
A WebAssembly build of the Go Excelize library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
3 of 16 committers (18.8%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A WebAssembly build of the Go Excelize library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
Basic Info
- Host: GitHub
- Owner: xuri
- License: bsd-3-clause
- Language: Go
- Default Branch: main
- Homepage: https://xuri.me/excelize
- Size: 445 KB
Statistics
- Stars: 287
- Watchers: 11
- Forks: 42
- Open Issues: 7
- Releases: 0
Topics
Metadata Files
README.md
excelize-wasm
Excelize-wasm is a pure WebAssembly / Javascript port of Go Excelize library that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel™ 2007 and later. Supports complex components by high compatibility. The full API docs can be found at docs reference.
Environment Compatibility
Browser | Version ---|--- Chrome | ≥57 Chrome for Android and Android Browser | ≥105 Edge | ≥16 Safari on macOS and iOS | ≥11 Firefox | ≥52 Firefox for Android | ≥104 Opera | ≥44 Opera Mobile | ≥64 Samsung Internet | ≥7.2 UC Browser for Android | ≥13.4 QQ Browser | ≥10.4 Node.js | ≥12.0.0 Deno | ≥1.0
Basic Usage
Installation
Node.js
bash
npm install --save excelize-wasm
Browser
html
<script src="excelize-wasm/index.js"></script>
Create spreadsheet
Here is a minimal example usage that will create spreadsheet file.
```javascript const { init } = require('excelize-wasm'); const fs = require('fs');
init('./node_modules/excelize-wasm/excelize.wasm.gz').then((excelize) => { const f = excelize.NewFile(); if (f.error) { console.log(f.error); return; } // Create a new sheet. const { index } = f.NewSheet('Sheet2'); // Set value of a cell. f.SetCellValue('Sheet2', 'A2', 'Hello world.'); f.SetCellValue('Sheet1', 'B2', 100); // Set active sheet of the workbook. f.SetActiveSheet(index); // Save spreadsheet by the given path. const { buffer, error } = f.WriteToBuffer(); if (error) { console.log(error); return; } fs.writeFile('Book1.xlsx', buffer, 'binary', (error) => { if (error) { console.log(error); } }); }); ```
Create spreadsheet in browser:
View code
```htmlReading spreadsheet
The following constitutes the bare to read a spreadsheet document.
```javascript const { init } = require('excelize-wasm'); const fs = require('fs');
init('./node_modules/excelize-wasm/excelize.wasm.gz').then((excelize) => {
const f = excelize.OpenReader(fs.readFileSync('Book1.xlsx'));
if (f.error) {
console.log(f.error);
return;
}
// Set value of a cell.
const ret1 = f.GetCellValue('Sheet1', 'B2');
if (ret1.error) {
console.log(ret1.error);
return;
}
console.log(ret1.value);
// Get all the rows in the Sheet1.
const ret2 = f.GetRows('Sheet1');
if (ret2.error) {
console.log(ret2.error);
return;
}
ret2.result.forEach((row) => {
row.forEach((colCell) => {
process.stdout.write(${colCell}\t);
});
console.log();
});
});
```
Add chart to spreadsheet file
With excelize-wasm chart generation and management is as easy as a few lines of code. You can build charts based on data in your worksheet or generate charts without any data in your worksheet at all.

```javascript const { init } = require('excelize-wasm'); const fs = require('fs');
init('./node_modules/excelize-wasm/excelize.wasm.gz').then((excelize) => { const f = excelize.NewFile(); if (f.error) { console.log(f.error); return; } [ [null, 'Apple', 'Orange', 'Pear'], ['Small', 2, 3, 3], ['Normal', 5, 2, 4], ['Large', 6, 7, 8], ].forEach((row, idx) => { const ret1 = excelize.CoordinatesToCellName(1, idx + 1); if (ret1.error) { console.log(ret1.error); return; } const res2 = f.SetSheetRow('Sheet1', ret1.cell, row); if (res2.error) { console.log(res2.error); return; } }); const ret3 = f.AddChart('Sheet1', 'E1', { Type: excelize.Col3DClustered, Series: [ { Name: 'Sheet1!$A$2', Categories: 'Sheet1!$B$1:$D$1', Values: 'Sheet1!$B$2:$D$2', }, { Name: 'Sheet1!$A$3', Categories: 'Sheet1!$B$1:$D$1', Values: 'Sheet1!$B$3:$D$3', }, { Name: 'Sheet1!$A$4', Categories: 'Sheet1!$B$1:$D$1', Values: 'Sheet1!$B$4:$D$4', }, ], Title: [{ Text: 'Fruit 3D Clustered Column Chart', }], }); if (ret3.error) { console.log(ret3.error); return; } // Save spreadsheet by the given path. const { buffer, error } = f.WriteToBuffer(); if (error) { console.log(error); return; } fs.writeFile('Book1.xlsx', buffer, 'binary', (error) => { if (error) { console.log(error); } }); }); ```
Add picture to spreadsheet file
```javascript const { init } = require('excelize-wasm'); const fs = require('fs');
init('./node_modules/excelize-wasm/excelize.wasm.gz').then((excelize) => { const f = excelize.OpenReader(fs.readFileSync('Book1.xlsx')); if (f.error) { console.log(f.error); return; } // Insert a picture. const ret1 = f.AddPictureFromBytes('Sheet1', 'A2', { Extension: '.png', File: fs.readFileSync('image.png'), Format: { AltText: 'Picture 1' }, }); if (ret1.error) { console.log(ret1.error); return; } // Insert a picture to worksheet with scaling. const ret2 = f.AddPictureFromBytes('Sheet1', 'D2', { Extension: '.jpg', File: fs.readFileSync('image.jpg'), Format: { AltText: 'Picture 2', ScaleX: 0.5, ScaleY: 0.5 }, }); if (ret2.error) { console.log(ret2.error); return; } // Insert a picture offset in the cell with printing support. const ret3 = f.AddPictureFromBytes('Sheet1', 'H2', { Extension: '.gif', File: fs.readFileSync('image.gif'), Format: { AltText: 'Picture 3', OffsetX: 15, OffsetY: 10, PrintObject: true, LockAspectRatio: false, Locked: false, }, }); if (ret3.error) { console.log(ret3.error); return; } // Save spreadsheet by the given path. const { buffer, error } = f.WriteToBuffer(); if (error) { console.log(error); return; } fs.writeFile('Book1.xlsx', buffer, 'binary', (error) => { if (error) { console.log(error); } }); }); ```
Contributing
Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.
Licenses
This program is under the terms of the BSD 3-Clause License. See https://opensource.org/licenses/BSD-3-Clause.
The Excel logo is a trademark of Microsoft Corporation. This artwork is an adaptation.
gopher.{ai,svg,png} was created by Takuya Ueda. Licensed under the Creative Commons 3.0 Attributions license.
Owner
- Login: xuri
- Kind: user
- Website: xuri.me
- Repositories: 33
- Profile: https://github.com/xuri
GitHub Events
Total
- Issues event: 10
- Watch event: 77
- Issue comment event: 13
- Push event: 20
- Pull request review comment event: 1
- Pull request review event: 6
- Gollum event: 3
- Pull request event: 9
- Fork event: 9
- Create event: 3
Last Year
- Issues event: 10
- Watch event: 77
- Issue comment event: 13
- Push event: 20
- Pull request review comment event: 1
- Pull request review event: 6
- Gollum event: 3
- Pull request event: 9
- Fork event: 9
- Create event: 3
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| xuri | x****e@g****m | 70 |
| Zhang Zhipeng | 4****5@q****m | 3 |
| 天爱有情 | t****g@1****m | 1 |
| zhangyimingdatiancai | 2****5@q****m | 1 |
| wanghaochen2024 | w****8@b****n | 1 |
| lidp20 | 1****9@q****m | 1 |
| fsfsx | 1****1@b****n | 1 |
| cnmlgbgithub | l****0@m****n | 1 |
| centurion-hub | h****0@g****m | 1 |
| Taomin | t****i@q****m | 1 |
| Tammy | x****e@i****m | 1 |
| Ricardo Spear | s****o@g****m | 1 |
| LogikMeister | 5****r | 1 |
| Greg | g****d | 1 |
| Constance | 4****v | 1 |
| Alexandre LEGOUT | 6****x | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 18
- Total pull requests: 25
- Average time to close issues: 15 days
- Average time to close pull requests: 5 days
- Total issue authors: 18
- Total pull request authors: 18
- Average comments per issue: 2.11
- Average comments per pull request: 0.8
- Merged pull requests: 20
- Bot issues: 0
- Bot pull requests: 2
Past Year
- Issues: 7
- Pull requests: 8
- Average time to close issues: 8 days
- Average time to close pull requests: 6 days
- Issue authors: 7
- Pull request authors: 5
- Average comments per issue: 1.29
- Average comments per pull request: 0.38
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- aswjh (1)
- jamninetyfive (1)
- cgarcia369 (1)
- woess (1)
- usamasarfraz (1)
- PetrChalov (1)
- sumcourage (1)
- riziles (1)
- zhuweiyou (1)
- logdd (1)
- zzinx58 (1)
- 098anu098 (1)
- toupswork (1)
- stephen-dahl (1)
- paustint (1)
Pull Request Authors
- peng (5)
- dependabot[bot] (4)
- glinford (2)
- LogikMeister (2)
- crush-wu (2)
- zhangyimingdatiancai (2)
- paustint (2)
- centurion-hub (2)
- my-lalex (2)
- cnmlgbgithub (1)
- fsfsx (1)
- lidp20 (1)
- tianaiyouqing (1)
- spearmootz (1)
- covv (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 5
-
Total downloads:
- npm 1,591 last-month
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 36
- Total maintainers: 2
proxy.golang.org: github.com/xuri/excelize-wasm/cmd
- Homepage: https://github.com/xuri/excelize-wasm
- Documentation: https://pkg.go.dev/github.com/xuri/excelize-wasm/cmd#section-documentation
- License: BSD-3-Clause
-
Latest release: v0.0.0-20240101062524-2d569afbe144
published about 2 years ago
Rankings
proxy.golang.org: github.com/xuri/excelize-wasm
- Documentation: https://pkg.go.dev/github.com/xuri/excelize-wasm#section-documentation
- License: bsd-3-clause
-
Latest release: v0.0.9
published 9 months ago
Rankings
npmjs.org: excelize-wasm
A pure WebAssembly / Javascript port of Go Excelize library that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files
- Homepage: https://xuri.me/excelize
- License: BSD-3-Clause
-
Latest release: 0.0.9
published 9 months ago
Rankings
Maintainers (1)
Funding
- type: individual
- url: https://www.paypal.com/paypalme/xuri
npmjs.org: excelize-wasm2
A pure WebAssembly / Javascript port of Go Excelize library that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files
- Homepage: https://xuri.me/excelize
- License: BSD-3-Clause
-
Latest release: 0.0.3
published over 2 years ago
Rankings
Maintainers (1)
Funding
- type: individual
- url: https://www.paypal.com/paypalme/xuri
npmjs.org: mpctest
mpc test
- Homepage: https://github.com/xuri/excelize-wasm#readme
- License: BSD-3-Clause
-
Latest release: 0.0.1
published over 2 years ago
Rankings
Maintainers (1)
Funding
- type: individual
- url: https://www.paypal.com/paypalme/xuri
Dependencies
- actions/checkout v4 composite
- actions/setup-go v5 composite
- actions/setup-node v3 composite
- codecov/codecov-action v4 composite
- JS-DevTools/npm-publish v2 composite
- actions/checkout v4 composite
- actions/setup-go v5 composite
- actions/setup-node v3 composite
- codecov/codecov-action v4 composite
- github.com/davecgh/go-spew v1.1.1
- github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
- github.com/pmezard/go-difflib v1.0.0
- github.com/richardlehane/mscfb v1.0.4
- github.com/richardlehane/msoleps v1.0.3
- github.com/stretchr/testify v1.8.4
- github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53
- github.com/xuri/excelize/v2 v2.8.2-0.20240328083735-ffad7aecb5b9
- github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7
- golang.org/x/crypto v0.21.0
- golang.org/x/image v0.15.0
- golang.org/x/net v0.22.0
- golang.org/x/text v0.14.0
- gopkg.in/yaml.v3 v3.0.1
- github.com/davecgh/go-spew v1.1.1
- github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
- github.com/pmezard/go-difflib v1.0.0
- github.com/richardlehane/mscfb v1.0.4
- github.com/richardlehane/msoleps v1.0.1
- github.com/richardlehane/msoleps v1.0.3
- github.com/stretchr/testify v1.8.4
- github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53
- github.com/xuri/excelize/v2 v2.8.2-0.20240328083735-ffad7aecb5b9
- github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7
- golang.org/x/crypto v0.21.0
- golang.org/x/image v0.15.0
- golang.org/x/net v0.22.0
- golang.org/x/text v0.14.0
- gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
- gopkg.in/yaml.v3 v3.0.1
- @jridgewell/gen-mapping 0.3.5 development
- @jridgewell/resolve-uri 3.1.2 development
- @jridgewell/set-array 1.2.1 development
- @jridgewell/source-map 0.3.5 development
- @jridgewell/sourcemap-codec 1.4.15 development
- @jridgewell/trace-mapping 0.3.25 development
- @rollup/plugin-commonjs 25.0.7 development
- @rollup/plugin-node-resolve 15.2.3 development
- @rollup/plugin-terser 0.4.4 development
- @rollup/pluginutils 5.1.0 development
- @rollup/rollup-android-arm-eabi 4.12.1 development
- @rollup/rollup-android-arm64 4.12.1 development
- @rollup/rollup-darwin-arm64 4.12.1 development
- @rollup/rollup-darwin-x64 4.12.1 development
- @rollup/rollup-linux-arm-gnueabihf 4.12.1 development
- @rollup/rollup-linux-arm64-gnu 4.12.1 development
- @rollup/rollup-linux-arm64-musl 4.12.1 development
- @rollup/rollup-linux-riscv64-gnu 4.12.1 development
- @rollup/rollup-linux-x64-gnu 4.12.1 development
- @rollup/rollup-linux-x64-musl 4.12.1 development
- @rollup/rollup-win32-arm64-msvc 4.12.1 development
- @rollup/rollup-win32-ia32-msvc 4.12.1 development
- @rollup/rollup-win32-x64-msvc 4.12.1 development
- @types/estree 1.0.5 development
- @types/resolve 1.20.2 development
- acorn 8.11.3 development
- balanced-match 1.0.2 development
- brace-expansion 2.0.1 development
- buffer-from 1.1.2 development
- builtin-modules 3.3.0 development
- commander 2.20.3 development
- commondir 1.0.1 development
- deepmerge 4.2.2 development
- estree-walker 2.0.2 development
- fs.realpath 1.0.0 development
- fsevents 2.3.2 development
- function-bind 1.1.1 development
- glob 8.0.3 development
- has 1.0.3 development
- inflight 1.0.6 development
- inherits 2.0.4 development
- is-builtin-module 3.2.1 development
- is-core-module 2.11.0 development
- is-module 1.0.0 development
- is-reference 1.2.1 development
- magic-string 0.30.8 development
- minimatch 5.1.2 development
- once 1.4.0 development
- pako 2.1.0 development
- path-parse 1.0.7 development
- picomatch 2.3.1 development
- randombytes 2.1.0 development
- resolve 1.22.1 development
- rollup 4.12.1 development
- safe-buffer 5.2.1 development
- serialize-javascript 6.0.2 development
- smob 1.4.1 development
- source-map 0.6.1 development
- source-map-support 0.5.21 development
- supports-preserve-symlinks-flag 1.0.0 development
- terser 5.29.1 development
- wrappy 1.0.2 development
- @rollup/plugin-commonjs 25.0.7 development
- @rollup/plugin-node-resolve 15.2.3 development
- @rollup/plugin-terser 0.4.4 development
- pako 2.1.0 development
- rollup 4.12.1 development