|
MXUnit 2.1.3 (Generated: 09/27/2012) | ||||
FRAMES |
WEB-INF.cftags.componentmxunit.framework.CSVUtility
public class CSVUtility
simple utility for creating query from a CSV file. This is meant as a testing utility, not as a bullet-proof component for production code
Method Summary | |
---|---|
private string |
getColumnList(string csvRow, any isHeaderRow, any columnDelimiter)
|
struct |
readCSV(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter='
'], [string columnDelimiter=','])
converts a CSV File into a Query |
array |
readCSVToArray(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter='
'], [string columnDelimiter=','])
returns a 2D array of data |
Methods inherited from class WEB-INF.cftags.component |
---|
|
Method Detail |
---|
private string getColumnList(string csvRow, any isHeaderRow, any columnDelimiter)
csvRow
isHeaderRow
columnDelimiter
public struct readCSV(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter='
'], [string columnDelimiter=','])
filePath
- full path to filehasHeaderRow
- whether the first row is a header row. If so, the values in the first row will be used as column names; otherwise, columns will be derivedrowDelimiter
- string used to delimit rows. chr(10) is defaultcolumnDelimiter
- string used to delimit columns; ',' is defaultpublic array readCSVToArray(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter='
'], [string columnDelimiter=','])
filePath
- full path to filehasHeaderRow
- whether the first row is a header row. If so, the values in the first row will be used as column names; otherwise, columns will be derivedrowDelimiter
- string used to delimit rows. chr(10) is defaultcolumnDelimiter
- string used to delimit columns; ',' is default
|
MXUnit 2.1.3 (Generated: 09/27/2012) | ||||
FRAMES |