ExportExcel
The ExportExcel() function takes a data block and exports it into an Excel workbook. The function can also append worksheets to existing Excel workbooks. This function is only available in the Quintessence Language (for example, Reports).
Syntax:
ExportExcel(Data, Path, [File format], [Worksheet], Cell)- In the Quintessence Editor (Studio) using Python language, use:
Qx.ExportExcel()
ⓘ See parameter descriptions
| Data | The data that will be exported. |
| File | The path to the Excel workbook to export. |
| File format (optional) | Type of Excel file format for export (e.g., xlsx). |
| Worksheet (optional) | Excel worksheet where data will be exported. |
| Cell | Cell reference where the data should start when exported. |
Remarks:
- Default parameters:
- File format:
xlsx - Worksheet:
Sheetn, where n is an integer. For example, if the sheet added is the 5th sheet in the workbook, the worksheet will be named Sheet5.
- File format:
- This function does not return any value when executed successfully.
- If the worksheet does not exist in an existing workbook, it will be added. If it does exist, any existing data in the sheet will be overwritten.
Examples:
The examples provided below are based on fictitious data for illustrative purposes only.
> Example 1: Export data into an Excel file
Data is stored in a variable called data_set.
data_to_export := ExportExcel(data_set, "C:\Generated data.xlsx" , "xlsx", "Data Sheet", "A1"));This will export the data in data_set into an Excel workbook called Generated data.xlsx, in the worksheet Data Sheet, starting from cell A1 on the C: drive.
