Write Excel Sheet
Write Excel Sheet
Section titled “Write Excel Sheet”Type: excel-write-sheet · Package: Excel Activities v1.0.0
Writes a complete DataTable to an Excel sheet, including the column names as the first row. It is the most direct way to generate a report or dump data to Excel. Create the file and sheet if they do not exist.
How it works
Section titled “How it works”Takes the DataTable of data and writes it to the indicated sheet, starting at startCell. By default clears the sheet before (clearSheet = true) and writes the headers (writeHeader = true). Accepts session or path — see the two modes.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
data | expression | The DataTable to write. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
session | expression | Excel Open session (instead of path). |
path | expression | Path to .xlsx (created if it does not exist; required if there is no session). |
sheet | expression | Sheet name (created if necessary). By default "Sheet1". |
writeHeader | boolean | Write the column names as the first row. By default true. |
startCell | text | Top left cell where to start. By default "A1". |
clearSheet | boolean | Clean the sheet before writing. By default true. |
Example
Section titled “Example”Read Excel Sheet path = = asset("ventas.xlsx") → output: ventas... procesar ...Write Excel Sheet path = = "C:/salida/reporte.xlsx" sheet = "Resumen" data = = ventasRelated activities
Section titled “Related activities”- Write Excel Range — write raw values to a position without header logic.
- Append Excel Rows — add rows to the end without deleting.
- Read Excel Sheet — read a DataTable back.