Changes

Activity:ReadCSVDocument (Activity)

2,289 bytes added, 11:10, 23 October 2013
Created page with "{{ActivityInfoBox | title = Read CSV Document | name = ReadCSVDocumnent | image = [[File:UI_Activity_ReadCSVDocument.png|220px]] | imagecaption = Activity ReadCSVDocument | pu..."
{{ActivityInfoBox
| title = Read CSV Document
| name = ReadCSVDocumnent
| image = [[File:UI_Activity_ReadCSVDocument.png|220px]]
| imagecaption = Activity ReadCSVDocument
| purpose = Load a CSV file as XPath document
| category = Data Exchange
| returns = True if successful
| version = 2.1.16+
}}
The ReadXPathDocument Activity loads a CSV File into the workflow and transforms it into XML for further processing using [http://en.wikipedia.org/wiki/XPath XPath] expressions. It is the root activity for an import of CSV data into {{UBIK}}.








==Arguments==

{| class="wikitable sortable" | width = "50%"
|-
! Argument!! Type !! Direction !! Purpose
|- align="left"
| ColumnName|| String || In || The name of the generated XML element for a column; default is ''Column''
|- align="left"
| FileName|| String || In || The full path to an accessible CSV file
|- align="left"
| FirstRowIsHeader|| Boolean|| In || Set this to true to ignore the first line (i.e. because it contains header information), to false if the first line should also be processed
|- align="left"
| RowName|| String || In || The name of the generated XML element for a row; default is ''Row''
|- align="left"
| Separator|| Char|| In || The char that separates columns in the source file
|- align="left"
| XPathDocument || XPathDocument|| Out || The loaded file as XPath document, null if loading failed
|- align="left"
| Result|| Boolean || Out || Returns True on success, false on error
|}

==Usage==

This activity is typically used to start the import of CSV data by providing the loaded document to subsequent [[Activity GetXPathResult|GetXPathResult]] activities.

==Example==

Load the CSV file C:\temp\test.CSV with the following content into the workflow:

<code>
FIRST NAME;LAST NAME;DATE OF BIRTH
John;Doe;01.01.1970
Jane;Doe;01.02.1971
Jebediah;Springfield;01.03.1774

</code>

{| class="wikitable" | width = "50%"
|-
! Argument!! Value
|- align="left"
| FileName|| <source lang = "vbnet">"C:\temp\test.CSV"</source>
|- align="left"
| FirstLineIsHeader|| <source lang = "vbnet">True</source>
|- align="left"
| Separator|| <source lang = "vbnet">';'</source>
|}

==See also==
* [[Workflow Designer]]
* [[GetXPathResult (Activity)]]

[[Category:Workflows]] [[Category:Activities]] [[Category:Interfacing]]