# 工作表列表（含元数据）

* 扩展版本大于等于 `1.6.0`；
* 编译时需添加 `--enable-reader`；

与 `sheetList()` 仅返回名称不同，`sheetListWithMeta()` 同时返回每个工作表的可见性状态。

## 函数原型

```php
sheetListWithMeta(): ?array
```

## 返回值

返回数组，每个元素描述一个工作表：

* `name` *(string)* — 工作表名称；
* `state` *(string)* — 可见性，取值为 `visible`、`hidden`、`veryHidden`。

未调用 `openFile()` 时返回 `null`。

## 示例

```php
$config = ['path' => './tests'];
$excel  = new \Vtiful\Kernel\Excel($config);

$meta = $excel->openFile('source.xlsx')
    ->sheetListWithMeta();

print_r($meta);
// Array
// (
//     [0] => Array ( [name] => Sheet1 [state] => visible )
//     [1] => Array ( [name] => Hidden  [state] => hidden  )
// )
```


---

# 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/reader/sheet-list-with-meta.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.
