> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# excelListSheets

> 指定したExcel ワークブック内のワークシートを、各シートの名前と非表示かどうかを含めてリストします。

指定したExcel ワークブック内のワークシートをリストします。

## オプションのパラメータ

* **version**: ターゲットワークブックのExcel バージョン。`AUTO`、`95`、`97-2003`、`2007` が使用可能です。デフォルトは`AUTO` です。
* **file**: Excel ワークブックの、ファイル名を含むディスク上のフルパス。`file` または`handle` のいずれかのパラメータを指定する必要があります。
* **handle**: [excelOpen](./op-excel-open)で作成されたExcel データへの読み取り可能なハンドルの参照。`file` パラメータを指定する場合、`handle` は不要です。

## アウトプット属性

* **sheet**: ターゲットワークブック内の現在のシートの名前。
* **ishidden**: 現在のシートがワークブック内で非表示になっているかどうかを示すブール値（true/false）。

## 例

この例では、ターゲットのExcel ワークブックのシートをリストし、ファイルに追加してから、スクリプトのアウトプットとしてプッシュします。

```xml theme={null}
<!-- Initializing the output item of the script -->
<arc:set attr="output.data" />
<!-- Creating the input item for the operation and passing it in -->
<arc:set attr="excel.file" value="C:\Temp\movies.xlsx" />
<arc:set attr="excel.version" value="2007" />
<arc:call op="excelListSheets" in="excel" out="sheets">
  <!-- Creating some output data and file from the sheet names in the workbook -->
  <arc:set attr="output.data" value="[output.data]\nSheet = [sheets.sheet] | Hidden = [sheets.ishidden]" />
  <arc:set attr="output.filename" value="results.txt" />
</arc:call>
<!-- Push the output item out as a file -->
<arc:push item="output" />
```

このスクリプトのアウトプットは次のようになります：

```
Sheet = music | Hidden = false
Sheet = tvshows | Hidden = true
Sheet = film | Hidden = false
```
