> For the complete documentation index, see [llms.txt](https://docs.zongsoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zongsoft.com/framework/externals/projects/closedxml.md).

# ClosedXml (closedxml)

ClosedXml 项目的能力范围、部署产物、接入入口与使用边界。

把业务模型接入 Excel 数据归档、提取与模板服务，适合导出业务记录、人工填写后再导入等流程。

| 项目项  | 值                                            |
| ---- | -------------------------------------------- |
| 源码目录 | `externals/closedxml`                        |
| 主包   | `Zongsoft.Externals.ClosedXml`               |
| 配套主题 | [表格与模板扩展](/framework/externals/documents.md) |

## 部署与使用入口

将主包追加到已有宿主的[部署清单](/references/deploy-files.md)，并保留包中的插件清单、程序集及附属运行资源：

{% code title="Application.deploy（追加片段）" %}

```ini
[plugins zongsoft externals closedxml]
nuget:Zongsoft.Externals.ClosedXml
```

{% endcode %}

通过 [核心类库](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Core) 的归档或模板契约按 `Spreadsheet` 格式匹配服务。实际数据服务优先提供自身描述器，让映射中的主键、长度和语义进入归档过程。

## 接入步骤

1. 沿专题的生成器示例导出少量模型记录，检查列名、显示格式和字段验证。
2. 人工修改或追加记录后，用同一模型描述提取，比较实际字段值。
3. 覆盖空表、空值、长整数、日期和字段变动，再接入业务校验与写入。

具体配置、调用示例和相关基础概念见[表格与模板扩展](/framework/externals/documents.md)。

## 项目边界

{% hint style="info" %}
💡 导入定位的是 Excel Table，表格名为 `__{model.QualifiedName}__`，工作表名或普通区域不能替代它。没有汇总行时会在表格列范围内向下提取追加记录，备注应放在列带之外。
{% endhint %}

## 继续阅读

[按项目浏览扩展](/framework/externals/projects.md) · [表格与模板扩展](/framework/externals/documents.md) · [源码与项目说明](https://github.com/Zongsoft/framework/tree/main/externals/closedxml)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zongsoft.com/framework/externals/projects/closedxml.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
