@christophervr/xlsx-core

中文文档
1.1.1发布于 2026/11/07Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 2740

Framework-neutral Excel workbook model, parser, formula engine and serializer with a semver-stable public API (thin entry point over ooxml-core/xlsx)

原始使用文档
文档目录7 节
  1. Install
  2. Quick start
  3. API and limitations
  4. Documentation
  5. Privacy and network use
  6. License
  7. OneDrive integration

@christophervr/xlsx-core

npm version license types

The DOM-free document model and file API, re-exported from the canonical OOXML core.

Live demo | npm | Full docs | Source

Part of ooxml: Office · Word · Excel · PowerPoint · Visio · OpenTeams · Core

The framework-neutral Excel workbook model, parser, formula engine and serializer. A thin entry point: @christophervr/xlsx-core re-exports ooxml-core/xlsx and @christophervr/xlsx-core/load re-exports ooxml-core/xlsx/load; the logic lives in ooxml-core.

Install

npm install @christophervr/xlsx-core

Quick start

import { createWorkbook, saveXlsx } from '@christophervr/xlsx-core';
import { loadWorkbook } from '@christophervr/xlsx-core/load';

const workbook = createWorkbook();
const bytes = await saveXlsx(workbook);
const reopened = await loadWorkbook(bytes, { fileName: 'Book1.xlsx' });

API and limitations

The main entry handles .xlsx, .xlsm and .xltx. The /load entry also opens legacy Excel 97-2003 .xls files (read only; they save as .xlsx) and .csv text, sniffing the format from the bytes. Saving is not lossless for features the model does not cover; unmodelled parts (VBA, pivot tables, and any chart content the chart model cannot carry) are carried through unchanged where the sheet still exists. Charts are edited over their parsed ChartSpace and written from it, except a chart part the model cannot carry, which keeps its source bytes and is reported.

Documentation

Full docs | Core source

Privacy and network use

The Excel packages make no network request when opening, rendering, editing or saving a document: linked pictures are not fetched, linked data is not refreshed, and fonts come from the device only (nothing is downloaded from Google Fonts or any other font service). Hyperlinks open only when the reader follows them. Nothing collects analytics or telemetry. See PRIVACY.md.

License

Apache-2.0.

OneDrive integration

Use the optional shared ooxml-core/embedding/onedrive connection with host-supplied Microsoft sign-in. See the Office package and integration reference for this product's load/save API, native storage wiring, sharing permissions and conflict recovery. The testing guide separates test-local transports from live Microsoft acceptance. No simulation service is shipped; OneDrive storage does not provide Microsoft Office coauthoring or automatic document merging.

版本与发布记录

@christophervr/xlsx-core 共发布 18 个版本,首次发布于 2026/10/02;过去 12 个月发布了 18 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.1.1latest2026/11/072 天前
1.1.02026/11/045 天前
1.0.02026/10/2911 天前
0.3.12026/10/2317 天前
0.3.02026/10/2119 天前
0.2.102026/10/091 个月前

关于 @christophervr/xlsx-core 的常见问题

@christophervr/xlsx-core 是什么?

Framework-neutral Excel workbook model, parser, formula engine and serializer with a semver-stable public API (thin entry point over ooxml-core/xlsx)

如何安装 @christophervr/xlsx-core?

在项目目录运行 npm install @christophervr/xlsx-core,或使用 pnpm add / yarn add / bun add。

@christophervr/xlsx-core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@christophervr/xlsx-core 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@christophervr/xlsx-core 可以商用吗?

@christophervr/xlsx-core 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@christophervr/xlsx-core 的下载量有多少?

根据 npm 官方下载统计,@christophervr/xlsx-core 在 2026/10/10 – 2026/11/08 这 30 天内被下载 2,740 次,日均约 91 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@christophervr/xlsx-core 还在维护吗?

最新版本 1.1.1 发布于 2026/11/07(2 天前);至今共发布 18 个版本,其中过去 12 个月发布了 18 个;首次发布于 2026/10/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。