Usage Scenario: Downloading Table Data in Excel Format
An administrator wants to export the table resulting from a specific SQL query in the application in Excel format. However, this operation is not a direct download; the data will first be converted to Base64 format and then used in another operation (e.g. downloading, e-mailing, saving to the server). The Get Excel Base64 action is activated for this conversion.
Adding the Get Excel Base64 Action
Log in to the Kuika platform.
Open the project you will work on from the Apps screen.
Switch to the UI Design module.
Open the Properties panel on the right side.
Select the component you want to add an action to (for example the “Export to Excel” button).
Follow the steps + ADD ACTION → Onclick → Export → Get Excel Base64.
Configure Get Excel Base64 Action Parameters
In the action window that opens, fill in the following fields:
Value: “data.tableData” → specifies the table data to be converted to Excel (usually the data obtained from a SQL query).
Header: “Sales Report” → the title to be displayed at the beginning of the Excel file.
Footer: “This document was auto-generated by the system.” → Description to be added at the bottom of the Excel document.
After adjusting the settings, click the SAVE button to complete the action.
After Action Usage
After this action runs, Get Excel Base64 will produce an Excel file in Base64 format.
This data:
It can send it to theDownload File action and download it to the user,
It can send it as an e-mail withSend Email action,