A CSV (comma-separated values) file is a text file that has a specific format that allows data to be saved in a table structured format.
Adding and setting parameters for Write
Adding and setting parameters for Read
Adding and setting parameters for Append
Let us understand CSV activities with an example process. Here is an example that takes the total Employee count from the user and gets each Employee's information (Name, ID, Email, and DOB) and writes it into a CSV file.
For getting the Employee information input dialog is used. Using DataTable Variables to store the input data before writing to CSV.
All CSV activities takes input/output as DataTable.
Separate workflow is created to adding into and displaying from DataTable.
invoke workflow activity is used to call DataTable workflows.
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
In Activity panel search for Input Dialog
Drag and drop Input Dialog activity to main panel.
Input Dialog is used to get the count of total Employee to be added.
Add invoke workflow activity and point to the appropriate workflow to add and display the Employee Info.
Here is the workflow AddDataToDataTable:
Write the user input information to csv file using Write activity.
Append Employee information to same csv file
Add Input Dialog activity to get the count of total Employee to be appended.
Clear the DataTable before appending the following employees.
Add invoke workflow activity and point to the appropriate workflow to add Employee information to the DataTable structure.
Add Append activity to append employee information.
Read and invoke display workflow.
Add Read activity to read the csv file.
Displays the Employee information written in a CSV file.
Save the process
- From the Design tab ribbon, click on Save
Run the process
- From the Design tab ribbon, click on Run
Ensure the process executes and takes employee information from the user and writes/appends/reads CSV files.
Download Example (C#)