# @christophervr/xlsx-core 中文文档

规范地址：https://npmcn.com/package/%40christophervr/xlsx-core/

版本：1\.1\.1
npm 元数据更新时间：2026-11-06T21:10:42.344Z
中文译文更新时间：2026-11-09T15:07:20.705Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40christophervr/xlsx-core
原文对照：https://npmcn.com/package/%40christophervr/xlsx-core/?lang=original
项目主页：https://christophervr.github.io/ooxml/xlsx/
源码仓库：https://github.com/ChristopherVR/ooxml

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：16.9 kB，8 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：1 个
- 首次发布：2026-10-02T13:30:58.055Z
- 最新版本发布：2026-11-06T21:10:42.029Z
- 近 30 天下载量：2740（2026-10-10 至 2026-11-08，npm 官方下载统计）
- 已发布版本数：18（近 12 个月 18 个）

## 中文简介

框架中性 Excel 工作手册模型、 解析器、 公式引擎和序列器, 并带有一个 semver- squalable 公共 API( ooxml- core/ xlsx 之上的切入点)

## 安装

```sh
npm install @christophervr/xlsx-core
```

也可以使用：`pnpm add @christophervr/xlsx-core`、`yarn add @christophervr/xlsx-core`、`bun add @christophervr/xlsx-core`

## README

# @ christophervr/ xlsx- 核心

[![npm version](https://img.shields.io/npm/v/%40christophervr%2Fxlsx-core.svg)](https://www.npmjs.com/package/@christophervr/xlsx-core) [![license](https://img.shields.io/npm/l/%40christophervr%2Fxlsx-core.svg)](https://github.com/ChristopherVR/ooxml/blob/main/viewers/xlsx/LICENSE) [![types](https://img.shields.io/npm/types/%40christophervr%2Fxlsx-core.svg)](https://www.npmjs.com/package/@christophervr/xlsx-core)

> DOM-无文件模式和文件API,从Cononical OOXML核心再出.

[现场演示](https://christophervr.github.io/ooxml/xlsx/demo/) | [无](https://www.npmjs.com/package/@christophervr/xlsx-core) | [完整文档](https://christophervr.github.io/ooxml/xlsx/) | [来源](https://github.com/ChristopherVR/ooxml/tree/main/viewers/xlsx)

部分 [氧化物](https://github.com/ChristopherVR/ooxml#readme)数字 : [办公室](https://github.com/ChristopherVR/ooxml#ooxml-office-the-whole-suite-in-one-app) • 妇女 [单词](https://github.com/ChristopherVR/ooxml/tree/main/viewers/docx#readme) • 妇女 **[埃克塞尔](https://github.com/ChristopherVR/ooxml/tree/main/viewers/xlsx#readme)** • 妇女 [电源点](https://github.com/ChristopherVR/ooxml/tree/main/viewers/pptx#readme) • 妇女 [维西奥](https://github.com/ChristopherVR/ooxml/tree/main/viewers/visio#readme) • 妇女 [打开小组](https://github.com/ChristopherVR/ooxml/tree/main/viewers/teams#readme) • 妇女 [核心](https://github.com/ChristopherVR/ooxml/tree/main/src/core#readme)

框架中立的Excel工作手册模型,解析器,公式引擎和序列器. 细入点 : `@christophervr/xlsx-core` 再出口 `ooxml-core/xlsx` 财务报告和审定财务报表 `@christophervr/xlsx-core/load` 再出口 `ooxml-core/xlsx/load`; 逻辑存在于 [氧化核](https://github.com/ChristopherVR/ooxml)。 。 。 .

## 安装

```bash
npm install @christophervr/xlsx-core
```

## 快开始

```ts
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和限制

主条目控件 `.xlsx`, (中文(简体) ), `.xlsm` 财务报告和审定财务报表 `.xltx`编辑 `/load` 条目还打开 Excel 97-2003 `.xls` 文件( 只读; 它们保存为 `.xlsx`和 `.csv` 文本,从字节中嗅出格式。 对模型未覆盖的特性来说,保存并非无所失;未建模的部件(VBA,中枢表,以及图表模型所不能携带的任何图表内容)在工作表仍然存在的地方通过不变的方式进行. 图表在解析后被编辑 `ChartSpace` 并且从中写出,但模型无法携带的图表部分除外,它保留了源字节并被报告.

## 文档

[完整文档](https://christophervr.github.io/ooxml/xlsx/) | [核心资源](https://github.com/ChristopherVR/ooxml)

## 隐私和网络使用

Excel软件包在打开,渲染,编辑或保存文档时不提出网络请求:链接图片没有被取出,链接数据没有被刷新,字体只来自该设备(没有从Google字体或任何其他字体服务下载到任何内容). 超链接只有在读者跟随时才打开. 没有东西收集分析或遥测。 见 [简 单](https://github.com/ChristopherVR/ooxml/blob/main/PRIVACY.md)。 。 。 .

## 许可证

阿帕奇2.0 (英语).

## 一驾驱动器集成

使用可选共享 `ooxml-core/embedding/onedrive` 连接到主机提供的微软 注册。 见 [办公包和综合参考资料](https://github.com/ChristopherVR/ooxml/blob/main/docs/onedrive-integration.md#excel-xlsx) 用于此产品的负载/保存 API,本地存储接线,共享权限和冲突恢复. 这个 [测试指南](https://github.com/ChristopherVR/ooxml/blob/main/docs/onedrive-testing.md) 将测试-局部运输与活的微软接受分离. 没有运送模拟服务; OneDrive存储器不提供Microsoft Office的同名或自动文档合并.

## 常见问题

### @christophervr/xlsx-core 是什么？

框架中性 Excel 工作手册模型、 解析器、 公式引擎和序列器, 并带有一个 semver- squalable 公共 API\( 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 和提交记录判断。

