<CCSV>.Root

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > CSV > cCSV class > <cCSV> constructor > <cCSV> properties >

<CCSV>.Root

 

Description

 

Retrieve column name for given column index.

 

Syntax

 

sColumnName = <cCSV>.Column.Name(nColumnIndex)

 

Returns

 

String, name of the column with given index.

 

Parameters

 

Name

Type

Optional

Meaning

nColumnIndex

Number

No

1 based column index

 

Remarks

 

In case column index is invalid, empty string will be returned.

 

Restrictions

 

You can use this property after a call to <cCSV>.Load.

 

See also

 

<cCSV>.Column.Index

<cCSV>.Load

 

Examples

 

uses "CSV""console"

 

dim data as new cCSV

data.Load(APP_ScriptPath + "big.csv"True)  ' Change to existing CSV file

 

printl $("Name of column 1: '{data.Column.Name(1)}'")
 

waitkey