開発者ツール
Excel・JSON・CSV変換
data-converter
Use Excel JSON CSV Converter through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · Headless
クイック操作
入力ファイル 0–1出力ファイル 1
入力
この Tool が受け付ける入力形式とファイル数です。
| 入力種類 | file-or-data |
|---|---|
| ファイル数 | 0 – 1 |
| 対応 MIME | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/csv, application/json, text/plain |
パラメータ
これらの値は request.options で渡します。
| パラメータ | 型 | 必須 | 既定値 | 許可値 / 範囲 | 説明 |
|---|---|---|---|---|---|
operation |
enum | 必須 | — | excel-to-json | json-to-excel | json-to-csv | csv-to-json | Conversion to perform. excel-to-json reads a workbook; json-to-excel creates XLSX; json-to-csv creates CSV; csv-to-json parses CSV. |
sheet |
string | 任意 | — | — | Excel worksheet name for excel-to-json. If omitted, the first worksheet is used. |
headerRow |
integer | 任意 | 1 |
1 – 1000 | 1-based row containing column headers for Excel or CSV input. |
flatten |
boolean | 任意 | true |
— | Flatten nested JSON objects into dotted column paths such as user.name before tabular export. |
delimiter |
enum | 任意 | auto |
auto | comma | semicolon | tab | CSV delimiter. auto detects comma, semicolon or tab from the first non-empty row. |
includeBom |
boolean | 任意 | true |
— | Prefix generated CSV with UTF-8 BOM for spreadsheet compatibility. |
出力
処理完了後に返される結果形式です。
| 型 | files+data |
|---|---|
| ファイル数 | 1 – 1 |
| 出力 MIME | application/json, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| Metadata | rows, columns, sheet, delimiter |
| ZIP アーカイブ | 非対応 |
基本例
対応する統合モードを確認し、生成された開始コードをコピーできます。
Headless
const result = await client.run("data-converter", {
options: { operation: "excel-to-json", headerRow: 1, flatten: true }
});
console.log(result.files, result.data, result.metadata);
Embedded
await client.mount({ tool: "data-converter", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.