SelectFromFile: Select Rows with Values From CSV/Excel File
Tag: SelectFromFile
Achieve row selection with values found in a CSV file.
</SelectFromFile>
Tag Attributes
Attributes | Attribute Values | Value Description |
---|---|---|
FilePath | N/A | Uniquely identifies the grid (grid code name) |
HasHeaders | N/A | Name of the list to use as a source of value to match row to |
And | True / False (Defaults to False) | Restrict or enlarge selection key |
Detailed Description
For each selection value, one SetParam is required with:
- Field = grid columnID
- Value = column rank in CSV / Excel file
Example (Users module in sapio365):
name (index: 0) | weight in kg (index: 1) | age (index: 2) | type (index: 3) | job title (index: 4) | city (index: 5) | continent (index: 6) |
---|---|---|---|---|---|---|
George | 199 | 68 | Member | engineer | Cairo | Africa |
Rodolf | 77 | 31 | Member | engineer | Redmond | Atlantis |
Michele | 29 | 51 | Guest | Consultant | Tulsa | North America |
Example Script
SelectFromFile
<ytriaAutomation>
<SelectFromFile FilePath="C:\dev\Temp_XML\selectFromFile.csv" HasHeaders="True" And="true">
<SetParam field="userType" value="3"/>
<SetParam field="city" value="5"/>
</SelectFromFile>
</ytriaAutomation>