wrote:
Hi Miguel,
Depends exactly on what you want to do... I will explain the three typical scenarios, although yours seems to be the last one:
- If your Excel data has no equivalent representation in OutSystems then you can go to the Data tab in Service Studio, right-click on Entities->Database and select "Import Entities from Excel...". This will create a new entity (or entities) that map to the Sheet(s) you have on your Excel file, and will use the info on the Excel file to bootstrap those entities with data.
- If you already have the entities and just want to bootstrap data, you can go to the Data tab in Service Studio, right-click on your Entity definition and select Advanced->"Create Action to Bootstrap Data from Excel...". This will create an Action and associated Timer to bootstrap those entities with data from the Excel file.
- If you want to dynamically import data when clicking on a button, I'd suggest:
- using the Popup_Upload RichWidgets web screen (as the target of a Popup_Editor) to get the Excel file, and then
- in the Notify action use the Excel To Record List tool to transform an Excel sheet into a list of Structure instances and process it.
A shortcut to implement the 3. scenario logic is to follow the instructions on the 2. scenario to let the platform generate the bootstrap action and any required structures and then remove the generated timer and the Excel file in the Data->Resources folder, and adapt the generated action to perform the import and any extra logic required in 3.2.
Hey there,
I've just solved the problem using a similar method from this post:
https://www.outsystems.com/forums/discussion/9384/importing-data-from-excel-help-users/
I would like to thank you for your time to answer my question.
Regards,
MB