Công cụ lập trình
Bộ công cụ CSV
csv-toolkit
Use CSV Toolkit through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · Headless
Quick actions
Input files 0–50Output files 1–100
Đầu vào
Accepted input contract for this Tool.
| Kind | file-or-data |
|---|---|
| File count | 0 – 50 |
| Accepted MIME types | text/csv, text/plain |
Tham số
Pass these values through request.options.
| Parameter | Type | Bắt buộc | Mặc định | Giá trị / Phạm vi | Mô tả |
|---|---|---|---|---|---|
operation |
enum | Optional | clean |
clean | merge | split | CSV workflow: clean transforms one CSV, merge combines multiple CSV files by header name, split divides one CSV into multiple files. |
delimiter |
enum | Optional | auto |
auto | comma | semicolon | tab | Input delimiter. auto detects comma, semicolon or tab. |
outputDelimiter |
enum | Optional | comma |
comma | semicolon | tab | Delimiter used for generated CSV files. |
headerRow |
integer | Optional | 1 |
1 – 1000 | 1-based row containing column headers. |
removeDuplicates |
boolean | Optional | false |
— | Remove exact duplicate rows after parsing. |
filterColumn |
string | Optional | — | — | Column used by the contains filter. Omit to disable filtering. |
filterValue |
string | Optional | — | — | Case-insensitive substring required in filterColumn. Omit to disable filtering. |
sortColumn |
string | Optional | — | — | Column used for sorting. Omit to preserve row order. |
sortDirection |
enum | Optional | asc |
asc | desc | Sort direction when sortColumn is provided. |
sortMode |
enum | Optional | auto |
auto | text | number | Comparison mode. auto uses numeric comparison when both values are numeric, otherwise text comparison. |
columns |
string[] | Optional | — | — | Ordered list of columns to keep in Clean mode. Omit to keep every column. |
rowsPerFile |
integer | Optional | 5000 |
1 – 1000000 | Maximum data rows per generated file in Split mode. |
includeBom |
boolean | Optional | true |
— | Prefix generated CSV with UTF-8 BOM. |
Đầu ra
Result contract returned after successful processing.
| Type | files+data |
|---|---|
| File count | 1 – 100 |
| MIME types | text/csv |
| Metadata | rows, columns, parts, inputFiles |
| ZIP archive | Yes · threshold 2 |
Ví dụ cơ bản
Choose a supported integration mode and copy the generated starter code.
Headless
const result = await client.run("csv-toolkit", {
options: { operation: "clean", delimiter: "auto", outputDelimiter: "comma", headerRow: 1 }
});
console.log(result.files, result.data, result.metadata);
Embedded
await client.mount({ tool: "csv-toolkit", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.