FREE OutSystems Workshops - Build an OutSystems App in 1 hour | ENROLL NOW

Tech Bites - How to import data from an excel file

< Back to Blog

In this video, we’ll show you how to upload and store data from an excel file.

First, it’s essential to check the columns of the excel file to match later those with the structure that’s going to hold the data.

Drag and drop the upload widget that you can find in the widget tree. Then set variables to store the file and the file name. 

Next, drag a button to process the upload. Double-click the button to link it to a new screen action. Here we will require a server action, so create one, name it, and add an input to receive the file. 

Then, drag an Excel To Record List node to the flow. This node receives the file and a record definition that should match the excel columns. Since the entity in which we want to store data has more attributes than the excel file, we must create a structure holding only the necessary attributes. 

Go to the entity, select all the relevant attributes and copy them. Afterwards, create the structure and paste the copied attributes into it.

Back to the flow, set the newly created structure as the record definition of the excel to record node. 

Then, drag a For Each node and set the excel records as the list to iterate through.

Use the entity’s record variable to convert the excel records to Raw data records by assigning each attribute. Use control D to get rid of the assigns that are not required.

 Finally, drag the create raw data entity action to create those records in the database.

Use the previously created server action in the screen action and add a feedback message if necessary. 

Let’s publish and test it in the browser.

Notice that there’s no data in the raw data entity yet. 

Once we upload the excel file and click the button, we get the feedback message and can now check the newly created raw data. 

There you go! I hope you enjoyed it!

Turn Up Academy

Apply to our Turn Up Boot Camp

Senior Instructor

Latest Articles

How to use WebAssembly inside OutSystems - Part 2

How to use WebAssembly inside OutSystems - Part 2

WebAssembly (WASM) is a new technology that is getting a lot of attention. We continue the use of Go compiled to WASM to show how we can use WASM inside OutSystems.

How to use WebAssembly inside OutSystems - Part 1

How to use WebAssembly inside OutSystems - Part 1

WebAssembly (WASM) is a new technology that's getting a lot of attention. On the browser, Javascript was the only programming language supported until the WASM Standard came out. OutSystems is designed to be a high performance platform, so we'll show you how to use WASM within OutSystems to take advantage of the extra performance points that WASM provides.

‍What’s new in OutSystems Developer Cloud

‍What’s new in OutSystems Developer Cloud

Have you heard about the OutSystems Developer Cloud and want to know more about what's new and what the big benefits are? Then this article is for you!