ExpertXls Excel Library for .NET
LoadFromCsv Method (csvStream, textEncoding, fieldsSeparator, topRowIndex, leftColumnIndex, workbookFormat, defaultSettings)
Namespaces ► ExpertXls.ExcelLib ► ExcelWorkbook ► LoadFromCsv(Stream, Encoding, String, Int32, Int32, ExcelWorkbookFormat, ExcelWorkbookDefaultSettings)
ExpertXls Excel Library for .NET
Loads a CSV stream into a worksheet.
Declaration Syntax

C# | Visual Basic | Visual C++

    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

    public:
    static ExcelWorkbook^ LoadFromCsv(
    	Stream^ csvStream,
    	Encoding^ textEncoding,
    	String^ fieldsSeparator,
    	int topRowIndex,
    	int leftColumnIndex,
    	ExcelWorkbookFormat workbookFormat,
    	ExcelWorkbookDefaultSettings^ defaultSettings
    )

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 .xlsx).

defaultSettings (ExcelWorkbookDefaultSettings)
  The default settings for the newly created workbook (like default font, row height or column width).

Return Value
The newly created workbook.

Assembly: ExpertXls.ExcelLib (Module: ExpertXls.ExcelLib) Version: 2.1.0.0 (2.1.0.0)