# 工作簿属性

为 xlsx 写入文档属性。Excel 的「文件 → 信息 → 属性」面板会读取这些字段。属性分两类：

* **标准属性** —— 由 OOXML 规范定义的固定字段（标题、作者、公司等），统一通过 `Excel::setProperties` 一次写入。
* **自定义属性** —— 由用户自定义键名 / 类型，通过 `Excel::setCustomProperty` 逐条写入。

## 函数原型

```php
setProperties(array $properties): self
setCustomProperty(string $name, mixed $value, ?string $type = null): self
```

本节内容：

* [标准属性](/zhong-wen-jian-ti/properties/standard.md)
* [自定义属性](/zhong-wen-jian-ti/properties/custom.md)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xlswriter-docs.viest.me/zhong-wen-jian-ti/properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
