docs.sheetjs.com/docz/docs/02-getting-started/01-installation/07-bun.md

52 lines
1.4 KiB
Markdown
Raw Normal View History

2022-07-09 23:59:44 +00:00
---
2022-08-24 23:48:22 +00:00
pagination_prev: getting-started/index
2023-07-26 20:18:07 +00:00
pagination_next: getting-started/examples/index
2022-07-09 23:59:44 +00:00
sidebar_position: 7
sidebar_custom_props:
summary: Download and Import ECMAScript Modules
---
import current from '/version.js';
# Bun
2023-05-07 13:58:36 +00:00
Module scripts are available at <https://cdn.sheetjs.com/>.
2022-07-09 23:59:44 +00:00
2023-05-07 13:58:36 +00:00
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/xlsx.mjs`}>https://cdn.sheetjs.com/xlsx-{current}/package/xlsx.mjs</a> is the URL for {current}</p>
2022-07-09 23:59:44 +00:00
After downloading the script, it can be directly imported:
```js
import * as XLSX from './xlsx.mjs';
2022-08-26 19:21:53 +00:00
import * as fs from 'fs';
XLSX.set_fs(fs);
2022-07-09 23:59:44 +00:00
```
2023-03-28 04:57:47 +00:00
:::caution Bun support is considered experimental.
Great open source software grows with user tests and reports. Any issues should
be reported to the Bun project for further diagnosis.
:::
2023-06-25 09:36:58 +00:00
:::tip pass
2023-04-27 09:12:19 +00:00
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
new versions are released!
:::
2022-08-26 19:21:53 +00:00
## Encoding support
2022-07-09 23:59:44 +00:00
2022-08-26 19:21:53 +00:00
If Encoding support is required, `cpexcel.full.mjs` must be manually imported.
2022-07-09 23:59:44 +00:00
2023-05-07 13:58:36 +00:00
<p><a href={`https://cdn.sheetjs.com/xlsx-${current}/package/dist/cpexcel.full.mjs`}>https://cdn.sheetjs.com/xlsx-{current}/package/dist/cpexcel.full.mjs</a> is the URL for {current}</p>
2022-07-09 23:59:44 +00:00
```ts
/* load the codepage support library for extended support with older formats */
import * as cptable from './cpexcel.full.mjs';
XLSX.set_cptable(cptable);
```