fieldExistsByIndex(index)

Method of the data object that returns true if a column, specified by index, exists in a CSV, XLS or XLSX file.

index

Number that represents a column in a CSV or XLS(X) file (1-based).

Example

The following script accesses all columns in a CSV file:

var allFields=[];
var i=1;

while (data.fieldExistsByIndex(i)) { allFields.push(data.extractByIndex(i++)); }

See also: extractByIndex(index, rowOffset).