FlexGrid for WPF | ComponentOne
C1.WPF.Grid.Excel Assembly / C1.WPF.Grid Namespace / Extensions Class / LoadExcel Method / LoadExcel(FlexGrid,String,ExcelFileFormat,String,LoadExcelOptions) Method
Instance of the FlexGrid to load the data into.
The path to the Excel file.
A ExcelFileFormat file format.
The name of the Excel sheet to load. If null, the first sheet will be loaded by default.
A LoadExcelOptions loading options.

In This Topic
    LoadExcel(FlexGrid,String,ExcelFileFormat,String,LoadExcelOptions) Method
    In This Topic
    Loads data from an Excel file into the specified grid synchronously.
    Syntax
    'Declaration
     
    Public Overloads Shared Sub LoadExcel( _
       ByVal grid As FlexGrid, _
       ByVal fileName As String, _
       ByVal fileFormat As ExcelFileFormat, _
       ByVal sheetName As String, _
       ByVal options As LoadExcelOptions _
    ) 
    public static void LoadExcel( 
       FlexGrid grid,
       string fileName,
       ExcelFileFormat fileFormat,
       string sheetName,
       LoadExcelOptions options
    )

    Parameters

    grid
    Instance of the FlexGrid to load the data into.
    fileName
    The path to the Excel file.
    fileFormat
    A ExcelFileFormat file format.
    sheetName
    The name of the Excel sheet to load. If null, the first sheet will be loaded by default.
    options
    A LoadExcelOptions loading options.
    Exceptions
    ExceptionDescription
    The exception that is thrown when one of the arguments provided to a method is not valid.
    See Also