[]
        
(Showing Draft Content)

C1.WPF.Grid.Extensions.LoadExcel

LoadExcel Method

LoadExcel(FlexGrid, string)

Loads data from an Excel file into the specified grid synchronously.

Declaration
public static void LoadExcel(this FlexGrid grid, string fileName)
Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

string fileName

The path to the Excel file.

LoadExcel(FlexGrid, string, string)

Loads data from an Excel file into the specified grid synchronously.

Declaration
public static void LoadExcel(this FlexGrid grid, string fileName, string sheetName)
Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, sheetName As String)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

string fileName

The path to the Excel file.

string sheetName

The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

Exceptions
Type Condition
ArgumentException

LoadExcel(FlexGrid, string, LoadExcelOptions)

Loads data from an Excel file into the specified grid synchronously.

Declaration
public static void LoadExcel(this FlexGrid grid, string fileName, LoadExcelOptions options)
Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, options As LoadExcelOptions)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

string fileName

The path to the Excel file.

LoadExcelOptions options

A LoadExcelOptions loading options.

LoadExcel(FlexGrid, string, string, LoadExcelOptions)

Loads data from an Excel file into the specified grid synchronously.

Declaration
public static void LoadExcel(this FlexGrid grid, string fileName, string sheetName, LoadExcelOptions options)
Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, sheetName As String, options As LoadExcelOptions)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

string fileName

The path to the Excel file.

string sheetName

The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

LoadExcelOptions options

A LoadExcelOptions loading options.

Exceptions
Type Condition
ArgumentException

LoadExcel(FlexGrid, string, ExcelFileFormat, string, LoadExcelOptions)

Loads data from an Excel file into the specified grid synchronously.

Declaration
public static void LoadExcel(this FlexGrid grid, string fileName, ExcelFileFormat fileFormat, string sheetName, LoadExcelOptions options)
Public Shared Sub LoadExcel(grid As FlexGrid, fileName As String, fileFormat As ExcelFileFormat, sheetName As String, options As LoadExcelOptions)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

string fileName

The path to the Excel file.

ExcelFileFormat fileFormat

A ExcelFileFormat file format.

string sheetName

The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

LoadExcelOptions options

A LoadExcelOptions loading options.

Exceptions
Type Condition
ArgumentException

LoadExcel(FlexGrid, Stream)

Loads Excel data from stream into the specified grid.

Declaration
public static void LoadExcel(this FlexGrid grid, Stream stream)
Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

Stream stream

A data Stream.

LoadExcel(FlexGrid, Stream, string)

Loads Excel data from stream into the specified grid.

Declaration
public static void LoadExcel(this FlexGrid grid, Stream stream, string sheetName)
Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, sheetName As String)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

Stream stream

A data Stream.

string sheetName

The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

Exceptions
Type Condition
ArgumentException

LoadExcel(FlexGrid, Stream, LoadExcelOptions)

Loads Excel data from stream into the specified grid.

Declaration
public static void LoadExcel(this FlexGrid grid, Stream stream, LoadExcelOptions options)
Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, options As LoadExcelOptions)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

Stream stream

A data Stream.

LoadExcelOptions options

A LoadExcelOptions loading options.

LoadExcel(FlexGrid, Stream, string, LoadExcelOptions)

Loads Excel data from stream into the specified grid.

Declaration
public static void LoadExcel(this FlexGrid grid, Stream stream, string sheetName, LoadExcelOptions options)
Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, sheetName As String, options As LoadExcelOptions)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

Stream stream

A data Stream.

string sheetName

The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

LoadExcelOptions options

A LoadExcelOptions loading options.

Exceptions
Type Condition
ArgumentException

LoadExcel(FlexGrid, Stream, ExcelFileFormat, string, LoadExcelOptions)

Loads Excel data from stream into the specified grid.

Declaration
public static void LoadExcel(this FlexGrid grid, Stream stream, ExcelFileFormat fileFormat, string sheetName, LoadExcelOptions options)
Public Shared Sub LoadExcel(grid As FlexGrid, stream As Stream, fileFormat As ExcelFileFormat, sheetName As String, options As LoadExcelOptions)
Parameters
Type Name Description
FlexGrid grid

Instance of the FlexGrid to load the data into.

Stream stream

A data Stream.

ExcelFileFormat fileFormat

A ExcelFileFormat file format.

string sheetName

The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

LoadExcelOptions options

A LoadExcelOptions loading options.

Exceptions
Type Condition
ArgumentException