Hello,
How can I import Excel data from Button? for the data grid.
"Before clicking the button, the data grid should be empty; only after clicking the button, should data appear in the data grid."
Hi Thanos,
In addition to the solution suggested by Mostafa, you will have to convert the excel record list data to JSON (with meta information) using the ArrangeData API action, available under the OutsystemsDataGrid module. Pass the generated json value as the Data source to DataGrid.
Your flow will look something like the below.
Demo Screen: DG_ImportXL
Refer to the attached oml
I hope this helps you!
Kind regards,
Benjith Sam
Hello Thanos,
You will need to create server action and use ExcelToRecordList widget which will convert excel to list of structure that you will create.
You need to create structure with attributes similar to ones existing into excel sheet.
You will need to pass record definition parameter to ExcelToRecordList widget which will be list of structure you created and pass excel file content may be from resources or from upload widget as per your implementation
After that you will pass the output of ExcelToRecordList (list of your structure) as source to your data grid
1. Create a bootstrap action to fetch the data from excel
2. Call the bootstrap action in 'OnClick' event of button