> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/solution-editor/actions/data-transform/csv.md).

# CSVアクション

CSVアクションはAnyflowの標準アプリで、以下の処理を実行できます。

* CSVを作成
* CSVを解析

## **CSVを作成**

配列からCSV形式の文字列を作成します。

### **入力フィールド**

<table><thead><tr><th width="214.18359375">フィールド名</th><th>説明</th></tr></thead><tbody><tr><td>CSV列名（改行区切り）</td><td>CSVの列名を <strong>1行ごと</strong> に入力します。<br>例:<br>列名1<br>列名2<br>列名3</td></tr><tr><td>ヘッダー行を作成する</td><td>「はい」を選択すると、指定した列名を使用してヘッダー行が作成されます。</td></tr><tr><td>カラム区切り文字</td><td>CSVコンテンツの区切り文字を指定します。区切り文字は以下から指定できます。<br>カンマ（,）スペース（ ）タブ（\t）コロン（:）セミコロン（;）パイプ（|）</td></tr><tr><td>引用符（"）を付加する</td><td>「はい」を選択すると、すべての値を引用符で囲います。</td></tr></tbody></table>

### **入力例**

freee人事労務から取得したデータを使いCSVを作成する例です。

<figure><img src="https://files.readme.io/7126751f502d120eab915941ec6d245b75f990cc851244097ae7645e6e1508c1-image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://files.readme.io/9eb18af6281c26fc1fa19d069f5c99e5aba13cdeeb33b76f56e057810ef143b2-image.png" alt=""><figcaption></figcaption></figure>

## **CSVを解析**

CSV形式の配列を行の配列に変換します。

### **入力フィールド**

<table><thead><tr><th width="233.234375">フィールド名</th><th>説明</th></tr></thead><tbody><tr><td>エンコード自動検出</td><td><p>文字列のエンコーディング方法を選択します。</p><p>有効: ファイルの文字列エンコードを自動で識別したうえで、適切にデコードし CSV を解析します。テキストデータが格納されたファイルは識別可能です。識別できない場合はエラーになります。<br>無効: ファイルがデコードされていることを前提に CSV を解析します。</p></td></tr><tr><td>CSVコンテンツ</td><td>最大ファイルサイズは50MBです。最大セル数は2,000,000セルです。</td></tr><tr><td>カラム区切り文字</td><td>CSVコンテンツの区切り文字を指定します。区切り文字は以下から指定できます。<br>カンマ（,）スペース（ ）タブ（\t）コロン（:）セミコロン（;）パイプ（|）</td></tr><tr><td>CSVコンテンツにヘッダー行が含まれている</td><td>CSVコンテンツに解析してはいけないヘッダー行がある場合は「はい」を選択します。</td></tr><tr><td>ヘッダー行</td><td>ヘッダー行を入力します。 カラム名は上記の「カラム区切り文字」フィールドで指定した文字で区切る必要があります。<br>例:カンマを指定した場合<br>ヘッダー1, ヘッダー2, ヘッダー3</td></tr></tbody></table>

### **入力例**

Google Drive から取得したデータを使いCSVを作成する例です。

<figure><img src="https://files.readme.io/2702c20baeb00fc886db7b6399d1797db8a0e1b857025f66bf115ec3f5121851-image.png" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

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

```
GET https://docs-embed.anyflow.jp/solution-editor/actions/data-transform/csv.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
