CSV/Excel to data table and vice versa (with a step-by-step example)
In this section, we will see how to extract data from an Excel file into a data table and vice versa. We will achieve this by:
- Reading an Excel file and creating a data table using data from the Excel file
- Creating a data table and then writing all its data to an Excel file
Reading an Excel file and creating a data table by using data from the Excel file
We have an existing Excel file and we are going to use it in our project:
- Drag and drop the
Flowchartactivity on the main Designer window. Also, drag and drop theExcel application scopeinside theFlowchart. - Double-click on the
Excel application scope. You have to specify the path of your workbook/Excel file. Drag and drop theRead Rangeactivity from theActivitiespanel inside theExcel application scope.
The Read Range activity will read the entire Excel sheet. We also have the option of specifying our range. Create a variable of type data table and specify it in the Output...