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

Loads a CSV file into a worksheet.

Definition

Namespace: Winnovative.ExcelLib
Assembly: WnvXls_NetCore (in WnvXls_NetCore.dll) Version: 11.0.0
C#
public static ExcelWorkbook LoadFromCsv(
	string csvFileName,
	Encoding textEncoding,
	string fieldsSeparator,
	int topRowIndex,
	int leftColumnIndex,
	ExcelWorkbookFormat workbookFormat,
	ExcelWorkbookDefaultSettings defaultSettings
)

Parameters

csvFileName  String
The full path of the CSV file.
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 .xlsx).
defaultSettings  ExcelWorkbookDefaultSettings
The default settings for the newly created workbook (like default font, row height or column width).

Return Value

ExcelWorkbook
The newly created workbook.

See Also