Skip to main content

Using CSV Activities

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.

There are set of activities to Read, Write and Append to csv files.

  • 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.

Note:

  • 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:

Step#1

Launch and create a new process in Process Designer

  • Launch Process Designer from the Windows Start menu located under IntelliBuddies Enterprise

Step#2

Create New Process

  • Click on New Process and fill in the new process details

Step#3

Step#4

  • Add invoke workflow activity and point to the appropriate workflow to add and display the Employee Info.

    • Here is the workflow AddDataToDataTable:

Step#5

  • Write the user input information to csv file using Write activity.

Step#6

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.

Step#7

Read and invoke display workflow.

  • Add Read activity to read the csv file.

  • Displays the Employee information written in a CSV file.

Step#8

Save the process

  • From the Design tab ribbon, click on Save

Step#7

Run the process

  • From the Design tab ribbon, click on Run

Step#8

Ensure the process executes and takes employee information from the user and writes/appends/reads CSV files.

Download Example (C#)