3.2 mheader - Acqusition method for field name array in CSV data

Return the field names (in the first row) of the CSV data file in an array. For files without field names in the first row, return the value of each field in the first row in an array.

3.2.1 Format

MCMD::mheader(arguments)

Specify the following arguments in character string separated with space at arguments.

i=

Input file name (String)

3.2.2 Example

Example 1

# dat1.csv
# customer,date,amount
# A,20081201,10
# B,20081002,40

> p MCMD::mheader("i=dat1.csv")
 => ["customer", "date", "amount"] 

Example 2

# dat1.csv
# A,20081201,10
# B,20081002,40

> p MCMD::mheader("i=dat1.csv")
 => ["A", "20081201", "10"] 

3.2.3 Related Commands

Mcsvin : Class for reading CSV data.

Mtable : Class for reading CSV data into cell.