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.
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.
10. In the Variables List, mark the data variables as Output.
11. Use the shortcut key F7 to debug in your Browser.