Skip to main content

Deno

Each standalone release script is available at https://cdn.sheetjs.com/.每个独立版本脚本都可以在https://cdn.sheetjs.com/上获得。

Using the URL imports, deno run will automatically download scripts and types:使用URL导入,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, cpexcel.full.mjs must be manually imported:如果需要XLS支持,则必须手动导入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);