Type alias CsvOpenOptions

CsvOpenOptions: {
    columnSeparator?: string;
    rowSeparator?: string;
    encoding?: string;
    columnHasHeader?: boolean;
}

Options to open the CSV file.

Type declaration

  • Optional columnSeparator?: string

    Optional. Column separator for CSV file. The default value is ','.

    Example

    viewer.openFile('Documents/HelloWorld.CSV', FileType.CSV, {columnSeparator: ','});
    
  • Optional rowSeparator?: string

    Optional. Row separator for CSV file. The default value is '\r\n'.

    Example

    viewer.openFile('Documents/HelloWorld.CSV', FileType.CSV, {rowSeparator: '\\r\\n'});
    
  • Optional encoding?: string

    Optional. Encoding for CSV file. The default value is 'UTF-8'.

    Example

    viewer.openFile('Documents/HelloWorld.CSV', FileType.CSV, {encoding: 'ANSI'});
    
  • Optional columnHasHeader?: boolean

    Optional. Whether the column data in the CSV file has a header. The default value is true.

    Example

    viewer.openFile('Documents/HelloWorld.CSV', FileType.CSV, {columnHasHeader: false});