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);
  [id(15),propput] HRESULT ColumnDataMappingFormatByIndex([in]int columnIndex, [in]BSTR format);
  [id(16),propput] HRESULT ColumnConditionalImportFormulaByIndex([in]int columnIndex, [in]BSTR formula);
  [id(17),propput] HRESULT ForceDataType([in]enumDataType datatype);
  [id(18),propput] HRESULT Charset([in]BSTR charset);
  [id(19),propput] HRESULT Language([in]BSTR Language);
  [id(20),       ] HRESULT ColumnPlacementByName([in]BSTR columnName, [in]int startRow, [in]int startColumn);
  [id(21),propput] HRESULT ColumnDataTypeByName([in]BSTR columnName, [in]enumDataType datatype);
  [id(22),propput] HRESULT ColumnStyleByName([in]BSTR columnName, [in]IXlsStyle* style);
  [id(23),propput] HRESULT ColumnFailIfEmptyByName([in]BSTR columnName, [in]BOOL failIfEmpty);
  [id(24),propput] HRESULT ColumnFormulaByName([in]BSTR columnName, [in]BSTR formula);
  [id(25),propput] HRESULT ColumnDataMappingFormatByName([in]BSTR columnName, [in]BSTR format);
  [id(26),propput] HRESULT ColumnConditionalImportFormulaByName([in]BSTR columnName, [in]BSTR formula);
  [id(27)        ] HRESULT ColumnSplitByName([in]BSTR columnName, [out, retval]IXlsImportColumnSplitter** columnSplit);
  [id(28)        ] HRESULT ColumnJoinByName([in]BSTR columnName, [out, retval]IXlsImportColumnJoiner** columnJoin);
  [id(29),propput] HRESULT AutoFormatMapping([in]BOOL bEnableAutoFormatMapping);
  [id(30),propput] HRESULT FirstRow([in]int row);
  [id(31),propput] HRESULT FirstColumn([in]int column);
  [id(32),propput] HRESULT AutoFit([in]BOOL autofit);
  [id(33),propput] HRESULT DataInRows([in]int rowsOfData);

}

 

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. For instance, to multiply the value of the incoming data, use a formula such as =2*CELL("contents")

HRESULT ColumnDataMappingFormatByIndex([in]int columnIndex, [in]BSTR format);
sets the data mapping format of a column, meant to make it possible to import custom formatted data such as dates. Not to be confused with the output format (defined in ColumnStyleByIndex). Column index starts at 1.

HRESULT ColumnConditionalImportFormulaByIndex([in]int columnIndex, [in]BSTR formula);
sets the conditional import formula of a column. Can be used to filter out input rows according to the passed condition.

HRESULT ForceDataType([in]enumDataType datatype);
sets the data type for all columns.

HRESULT Charset([in]BSTR charset);
sets the charset encoding for the data. For instance, iso-8859-1.

HRESULT Language([in]BSTR Language);
sets the language for the data. For instance, en-US.

HRESULT ColumnPlacementByName([in]BSTR columnName, [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.

HRESULT ColumnDataTypeByName([in]BSTR columnName, [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.

HRESULT ColumnStyleByName([in]BSTR columnName, [in]IXlsStyle* style);
sets the style of a column. Default is default style.

HRESULT ColumnFailIfEmptyByName([in]BSTR columnName, [in]BOOL failIfEmpty);
sets whether the importer should fail on error if there is an empty field in the given column. Default is no.

HRESULT ColumnFormulaByName([in]BSTR columnName, [in]BSTR formula);
sets the formula of a column.

HRESULT ColumnDataMappingFormatByName([in]BSTR columnName, [in]BSTR format);
sets the data mapping format of a column, meant to make it possible to import custom formatted data such as dates. Not to be confused with the output format (defined in ColumnStyleByName).

HRESULT ColumnConditionalImportFormulaByName([in]BSTR columnName, [in]BSTR formula);
sets the conditional import formula of a column. Can be used to filter out input rows according to the passed condition.

HRESULT ColumnSplitByName([in]BSTR columnName, [out, retval]IXlsImportColumnSplitter** columnSplit);
splits a column, passed by name, into multiple columns.

HRESULT ColumnJoinByName([in]BSTR columnName, [out, retval]IXlsImportColumnJoiner** columnJoin);
joins columns, into a single column passed by name.

HRESULT AutoFormatMapping([in]BOOL bEnableAutoFormatMapping);
sets whether the data should be mapped into numbers/formats combination wherever applicable. Default is : true.

HRESULT FirstRow([in]int row);
sets the first row where the data is inserted during the import process.

HRESULT FirstColumn([in]int column);
sets the first column where the data is inserted during the import process.

HRESULT AutoFit([in]BOOL autofit);
sets whether the columns should be auto-fit, i.e. automatically adjust to the largest width of the values in each column. Default : true.

HRESULT DataInRows([in]int rowsOfData);
sets the number of rows that are making up columns. Default is : 1. Use it if data is organized vertically as opposed to horizontally.