Excel
Purpose
Section titled “Purpose”The Excel Operator enables working with Excel spreadsheet files. It provides functionality for converting data to Excel format, parsing Excel content into structured data, and extracting header information from Excel files.
Use Cases
Section titled “Use Cases”- Converting object data to Excel format
- Parsing Excel files into structured data
- Extracting header information from Excel files
- Integrating with systems that use Excel for data exchange
- Processing tabular data in Excel format
- Data transformation between Excel and other formats
- Generating Excel reports or documents
- Analyzing Excel-based data
Supported Operations
Section titled “Supported Operations”to-excel
Section titled “to-excel”Converts an input object to an Excel file. Uses object fields/elements as Excel columns.
Input Parameters
Section titled “Input Parameters”value
(Object): The data to convert to Excel formatuseHeader
(boolean): Whether to include a header row in the Excel file
Output
Section titled “Output”Returns a FileDto object containing information about the created Excel file, including:
id
(string): The unique identifier of the filename
(string): The file name (default is “data.xlsx”)contentType
(string): The content type (“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”)size
(long): The file size in bytesorganizationId
(string): The organization ID associated with the file
Example
Section titled “Example”{ "value": { "customers": [ { "id": "12345", "name": "John Doe", "address": "123 Main St, Anytown, 12345" }, { "id": "67890", "name": "Jane Smith", "address": "456 Oak Ave, Somewhere, 67890" } ] }, "useHeader": true}
from-excel
Section titled “from-excel”Reads a provided Excel file and converts it to structured data.
Input Parameters
Section titled “Input Parameters”file
(FileDto): The Excel file to readuseHeader
(boolean): Whether the Excel file has a header row
Output
Section titled “Output”Returns a List of Maps representing the Excel data structure, with column names as keys and cell values as values. If useHeader
is true, the first row is used as column names; otherwise, column indices are used as keys.
Example
Section titled “Example”{ "file": { "id": "file-123", "organizationId": "org-456" }, "useHeader": true}
get-header
Section titled “get-header”Extracts header information from an Excel file.
Input Parameters
Section titled “Input Parameters”file
(FileDto): The Excel file to readhasHeaderRow
(boolean): Whether the Excel file has a header row
Output
Section titled “Output”Returns a List of Strings representing the column headers in the Excel file. If hasHeaderRow
is true, the first row is returned; otherwise, column indices are returned.
Example
Section titled “Example”{ "file": { "id": "file-123", "organizationId": "org-456" }, "hasHeaderRow": true}
- The operator supports both XLS and XLSX formats
- Complex objects are converted to Excel rows with columns for each field
- Lists of objects are converted to multiple rows in the Excel file
- The Excel parsing preserves the data types of the original cells when possible