IXlsCSVImportOptions
COM interface ( getting help with interfaces )

 

interface IXlsCSVImportOptions : IDispatch
{
  [id(1), propput] HRESULT SeparationCharacter([in]BSTR character);
  [id(2), propput] HRESULT DecimalCharacter([in]BSTR character);
  [id(3), propput] HRESULT ImportHeaders([in]BOOL importHeaders);
  [id(4), propput] HRESULT HeaderRows([in]int rowsInHeaders);
  [id(5), propput] HRESULT HeaderStyle([in]IXlsStyle* style);
  [id(6), propput] HRESULT PreserveWhitespace([in]BOOL preserveWhitespace);
  [id(7), propput] HRESULT UTF8Encoding([in]BOOL utf8Encoding);
  [id(8), propput] HRESULT MultipleWorksheets([in]BOOL multipleWorksheets);
  [id(9), propput] HRESULT AbortIfInvalidData([in]BOOL abortIfInvalid);
  [id(10)        ] HRESULT ColumnPlacementByIndex([in]int columnIndex, [in]int startRow, [in]int startColumn);
  [id(11),propput] HRESULT ColumnDataTypeByIndex([in]int columnIndex, [in]enumDataType datatype);
  [id(12),propput] HRESULT ColumnStyleByIndex([in]int columnIndex, [in]IXlsStyle* style);
  [id(13),propput] HRESULT ColumnFailIfEmptyByIndex([in]int columnIndex, [in]BOOL failIfEmpty);
  [id(14),propput] HRESULT ColumnFormulaByIndex([in]int columnIndex, [in]BSTR formula);

}

 

HRESULT SeparationCharacter([in]BSTR character);
sets the separation character between fields. Default is semi-colon or tab.

HRESULT DecimalCharacter([in]BSTR character);
sets the decimal character used to represent decimal numbers. Default is comma or dot.

HRESULT ImportHeaders([in]BOOL importHeaders);
sets whether the column headers of the CSV file should be imported. Default is yes.

HRESULT HeaderRows([in]int rowsInHeaders);
sets the number of rows in the column headers. Default is : automatically calculated by the importer.

HRESULT HeaderStyle([in]IXlsStyle* style);
sets the formatting style of headers.

HRESULT PreserveWhitespace([in]BOOL preserveWhitespace);
sets whether the spaces on the left and on the right of data should be preserved. Default is yes. Otherwise, spaces are trimmed.

HRESULT UTF8Encoding([in]BOOL utf8Encoding);
sets whether the data is expressed using the Unicode UTF8 encoding (variable length, international standard). Default is no, the data is assumed to be expressed using the user locale codepage (see Windows, regional settings).

HRESULT MultipleWorksheets([in]BOOL multipleWorksheets);
sets whether the importer is allowed to create multiple worksheets is the data has more than 256 columns or more than 65536 rows. Default is no. If this option is not enabled, huge CSV files will be truncated to whatever fits the current worksheet.

HRESULT AbortIfInvalidData([in]BOOL abortIfInvalid);
sets whether the importer should abort if invalid data is getting imported. Default is no. An example of invalid data is a non-date string in a date column.

HRESULT ColumnPlacementByIndex([in]int columnIndex, [in]int startRow, [in]int startColumn);
sets where a column should be imported in the worksheet. Default is first row of i-th column of the worksheet. Column index starts at 1.

HRESULT ColumnDataTypeByIndex([in]int columnIndex, [in]enumDataType datatype);
sets the data type of a column used to bind the imported data and the actual data in the Excel workbook. Default is automatic inference of the data type. Column index starts at 1.

HRESULT ColumnStyleByIndex([in]int columnIndex, [in]IXlsStyle* style);
sets the style of a column. Default is default style. Column index starts at 1.

HRESULT ColumnFailIfEmptyByIndex([in]int columnIndex, [in]BOOL failIfEmpty);
sets whether the importer should fail on error if there is an empty field in the given column. Default is no. Column index starts at 1.

HRESULT ColumnFormulaByIndex([in]int columnIndex, [in]BSTR formula);
sets the formula of a column.