Hello Henrique,
I have provided solution & steps to upload an excel, which only has 3 attributes that need to be saved in OS database, like exactly matching the attributes in the Database.
Follow the below steps and refer the attached oml file to achieve your requirement, also use the attached excel for testing.
For Traditional: [https://andrew-ajay.outsystemscloud.com/ExcelUpload/Upload.aspx]
- Use upload widget & a button to upload the excel in the screen in service studio.
- In the screen action of the upload widget use a ExceltoRecord widget & map the record definition as [Target table name] & file content as Upload.Content
- Use a For loop condition[Map Record list as ExcelToRecordList1] followed by a create server action[Map source as ExcelToRecordList1.Current]
For Reactive: [https://andrew-ajay.outsystemscloud.com/ExcelUploadReactive/Upload?_ts=637582875208450998]
- Use upload widget[Map file content with a local variable as Binary data datatype and File name with a local variable as Text datatype] & a button to upload the excel in the screen in service studio.
- Create a server action inside the client action with a input parameter with data type as binary data
- Use a ExceltoRecord widget & map the record definition as [Target table name] & file content as server action Input parameter
- Use a For loop condition[Map Record list as ExcelToRecordList1] followed by a create server action[Map source as ExcelToRecordList1.Current]
Note: The uploading excel header title should have the same name as the attribute has, if the title is different an empty value will be stored.
Regards
Ajay A