ExcelWorkbookLoadFromCsv Method (Stream, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings) |
Loads a CSV stream into a worksheet.
Namespace:
ExpertXls.ExcelLib
Assembly:
expertxls (in expertxls.dll) Version: 7.0.0
Syntax public static ExcelWorkbook LoadFromCsv(
Stream csvStream,
Encoding textEncoding,
string fieldsSeparator,
int topRowIndex,
int leftColumnIndex,
ExcelWorkbookFormat workbookFormat,
ExcelWorkbookDefaultSettings defaultSettings
)
Public Shared Function LoadFromCsv (
csvStream As Stream,
textEncoding As Encoding,
fieldsSeparator As String,
topRowIndex As Integer,
leftColumnIndex As Integer,
workbookFormat As ExcelWorkbookFormat,
defaultSettings As ExcelWorkbookDefaultSettings
) As ExcelWorkbook
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: ExpertXls.ExcelLibExcelWorkbookFormat
The format of the created workbook ( Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx). - defaultSettings
- Type: ExpertXls.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