DataTable is a variable type representing tabular data as an in-memory, tabular cache, or spreadsheet of rows, columns, and constraints.Refer to Microsoft documentation for more details.
Adding new variable of type DataTable
Creating new instance
- This variable is mainly helpful during the migration of data from one database/Excel to another database/Excel.
- Following activities can be used in DataTable add/delete rows/columns Add Data Column, Add Data Row, Clear DataTable, For Each Row, Remove Data Column, Remove Data Row
Let us understand the DataTable variable with an example process. This example takes user info (First, last, and age) as input and stores the data in DataTable, finally writes to Excel Spreadsheet.
Come, let's create this process in Process Designer:
Launch and create a new process in Process Designer
- Launch Process Designer from the Windows Start menu located under IntelliBuddies Enterprise
Create New Process
Click on New Process and fill in the new process details
Add variables to hold the input in the DataTable variable.
The following list of variables is used to hold different data.
In Activity panel search for Input Dialog
- Add Excel activites Open Spreadsheer, Open Spreadsheer and Close Spreadsheer
- Copy blank Excel file with name outputFile.xlsx to project location.
Save the process
- From the Design tab ribbon, click on Save
Run the process
- From the Design tab ribbon, click on Run
Make sure the process executes and pops up an input dialog. Enter the First and Last Name and then age as input through the input dialog. Click on Ok. Once the execution is completed, open the outputFile.xlsx where the input user details are stored in an Excel Spreadsheet. Note: The Excel data is overwritten on repeated execution.
Excel file filled with user info
Download Example (C#)