Loads a CSV stream into a worksheet.
Namespace: Winnovative.ExcelLib
Assembly: wnvxls (in wnvxls.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
public static ExcelWorkbook LoadFromCsv( Stream csvStream, Encoding textEncoding, string fieldsSeparator, int topRowIndex, int leftColumnIndex, ExcelWorkbookFormat workbookFormat, ExcelWorkbookDefaultSettings defaultSettings )
Parameters
- csvStream
- Type: System.IOStream
The stream containing the CSV document. - textEncoding
- Type: System.TextEncoding
The encoding of the text inside CSV (e.g. windows-1252, utf-8, etc). - fieldsSeparator
- Type: SystemString
The fields separator in CSV (usually ',') - topRowIndex
- Type: SystemInt32
The one based index of the first row in worksheet where the import will start. - leftColumnIndex
- Type: SystemInt32
The one based index of the first column in worksheet where the import will start. - workbookFormat
- Type: Winnovative.ExcelLibExcelWorkbookFormat
The format of the created workbook ( Excel 97-2003 .xls or Excel 2007 .xlsx). - defaultSettings
- Type: Winnovative.ExcelLibExcelWorkbookDefaultSettings
The default settings for the newly created workbook (like default font, row height or column width).
Return Value
Type: ExcelWorkbookThe newly created workbook.
See Also