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

In This Topic
    LoadExcelAsync(FlexGrid,String,String) Method
    In This Topic
    Loads data from an Excel file into the specified grid asynchronously.
    Syntax
    'Declaration
     
    Public Overloads Shared Function LoadExcelAsync( _
       ByVal grid As FlexGrid, _
       ByVal fileName As String, _
       ByVal sheetName As String _
    ) As Task
    public static Task LoadExcelAsync( 
       FlexGrid grid,
       string fileName,
       string sheetName
    )

    Parameters

    grid
    Instance of the FlexGrid to load the data into.
    fileName
    The path to the Excel file.
    sheetName
    The name of the Excel sheet to load. If null, the first sheet will be loaded by default.

    Return Value

    A System.Threading.Tasks.Task representing the asynchronous operation.
    Exceptions
    ExceptionDescription
    The exception that is thrown when one of the arguments provided to a method is not valid.
    The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
    The exception that is thrown when a path or fully qualified file name is longer than the system-defined maximum length.
    The exception that is thrown when part of a file or directory cannot be found.
    The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.
    The exception that is thrown when an attempt to access a file that does not exist on disk fails.
    The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.
    The exception that is thrown when an I/O error occurs.
    The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.
    See Also