Click or drag to resize

ExcelWorkbookLoadFromCsv Method (String, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings)

Loads a CSV file into a worksheet.

Namespace:  ExpertXls.ExcelLib
Assembly:  expertxls (in expertxls.dll) Version: 7.0.0
Syntax
public static ExcelWorkbook LoadFromCsv(
	string csvFileName,
	Encoding textEncoding,
	string fieldsSeparator,
	int topRowIndex,
	int leftColumnIndex,
	ExcelWorkbookFormat workbookFormat,
	ExcelWorkbookDefaultSettings defaultSettings
)

Parameters

csvFileName
Type: SystemString
The full path of the CSV file.
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: ExcelWorkbook
The newly created workbook.
See Also