1. Home
  2. Using Warewolf
  3. Reading a CSV File in Warewolf

Reading a CSV File in Warewolf

Warewolf has the capability to read CSV files. We will be using the CSV file that we created in Creating a CSV file in Warewolf. Follow the steps below to read the data from the CSV that we created:

1. Open a new tab, search for the Read File tool in the toolbox and attach it to the Start Node on the design surface. Then open the tool in large view by double clicking at the top of the tool.

2. In the File Name field, type in the full path name of the CSV file you are trying to read. In this example we will use C:\temp\csvtest.csv .

3. The content of the file will be returned in the Result field. Enter [[CSV]] and click Done.

Read File as seen in the Reading CSV files in Warewolf - Knowledge Base Article for Warewolf

4. Drag and drop the Data Split tool onto the design surface and connect it to the Read File tool. Open it in large view.

5. Type [[CSV]] as the string to split. The process direction is set to Forward by default.

6. In the Results column add your variables [[data().a]], [[data().b]], [[data().c]], [[data().d]] .

7. In the With column select Chars from the drop down menu. This is where the data will be split. The last variable will be set to New Line.

8. In the Using Column you can insert a comma (,) in each field.

9. Click Done.

Data Split Tool as seen in reading a CSV file in Warewolf

10. In the Variables List, mark the data variables as Output.

Mark the Variables as Output as seen in the Warewolf article on Reading CSV files in Warewolf

11. Use the shortcut key F7 to debug in your Browser.

Result shown in Browser - Reading a CSV file in Warewolf

 

FacebookTwitterLinkedInGoogle+Email
Updated on January 10, 2018

Was this article helpful?

Related Articles