ExcelWorkbookLoadFromCsv(Stream, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings) Method |
Loads a CSV stream into a worksheet.
Namespace: ExpertXls.ExcelLibAssembly: expertxls (in expertxls.dll) Version: 9.0.0
Syntaxpublic 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 Stream
- The stream containing the CSV document.
- textEncoding Encoding
- The encoding of the text inside CSV (e.g. windows-1252, utf-8, etc).
- fieldsSeparator String
- The fields separator in CSV (usually ',')
- topRowIndex Int32
- The one based index of the first row in worksheet where the import will start.
- leftColumnIndex Int32
- The one based index of the first column in worksheet where the import will start.
- workbookFormat ExcelWorkbookFormat
- The format of the created workbook ( Excel 97-2003 .xls or Excel 2007-2019 or above .xlsx).
- defaultSettings ExcelWorkbookDefaultSettings
- The default settings for the newly created workbook (like default font, row height or column width).
Return Value
ExcelWorkbookThe newly created workbook.
See Also