Deno
Each standalone release script is available at https://cdn.sheetjs.com/.每个独立版本脚本都可以在https://cdn.sheetjs.com/上获得。
Using the URL imports, 使用URL导入,deno run
will automatically download scripts and types:deno run
将自动下载脚本和类型:
// @deno-types="https://cdn.sheetjs.com/xlsx-0.18.9/package/types/index.d.ts"
import * as XLSX from 'https://cdn.sheetjs.com/xlsx-0.18.9/package/xlsx.mjs';
The @deno-types
comment instructs Deno to use the type definitions.@deno-types
注释指示deno使用类型定义。
XLS SupportXLS支持
If XLS support is required, 如果需要XLS支持,则必须手动导入cpexcel.full.mjs
must be manually imported:cpexcel.full.mjs
:
/* load the codepage support library for extended support with older formats */
import * as cptable from 'https://cdn.sheetjs.com/xlsx-0.18.9/package/dist/cpexcel.full.mjs';
XLSX.set_cptable(cptable);