[]
Loads an Excel worksheet from a file.
public void Load(string fileName)
Public Sub Load(fileName As String)
| Type | Name | Description |
|---|---|---|
| string | fileName | Name of the file that contains the worksheet. |
<p>Component One Excel infers the file format automatically based on the
file name extension. "XLSX" and "ZIP" files are loaded as OpenXml; all others are loaded as Biff8 files ("xls").
If the file doesn't exist, is locked, or is not a valid Excel file, an exception is thrown.
Loads an Excel worksheet from a file.
public void Load(string fileName, bool fillSheets)
Public Sub Load(fileName As String, fillSheets As Boolean)
| Type | Name | Description |
|---|---|---|
| string | fileName | Name of the file that contains the worksheet. |
| bool | fillSheets | True to load data into the sheets; False to read the sheet names only. |
Loads an Excel worksheet from a file.
public void Load(string fileName, FileFormat format)
Public Sub Load(fileName As String, format As FileFormat)
| Type | Name | Description |
|---|---|---|
| string | fileName | Name of the file that contains the worksheet. |
| FileFormat | format | C1.WPF.Excel.C1XLBook.FileFormat value that specifies the file format. |
Loads an Excel worksheet from a file.
public void Load(string fileName, FileFormat format, bool fillSheets)
Public Sub Load(fileName As String, format As FileFormat, fillSheets As Boolean)
| Type | Name | Description |
|---|---|---|
| string | fileName | Name of the file that contains the worksheet. |
| FileFormat | format | C1.WPF.Excel.C1XLBook.FileFormat value that specifies the file format. |
| bool | fillSheets | True to load data into the sheets; False to read the sheet names only. |
Loads the worksheet from a stream.
public void Load(Stream stream)
Public Sub Load(stream As Stream)
| Type | Name | Description |
|---|---|---|
| Stream | stream | Stream that contains the worksheet. |
Loads the worksheet from a stream.
public void Load(Stream stream, bool fillSheets)
Public Sub Load(stream As Stream, fillSheets As Boolean)
| Type | Name | Description |
|---|---|---|
| Stream | stream | Stream that contains the worksheet. |
| bool | fillSheets | True to load data into the sheets; False to read the sheet names only. |
Loads the worksheet from a stream.
public void Load(Stream stream, FileFormat format)
Public Sub Load(stream As Stream, format As FileFormat)
| Type | Name | Description |
|---|---|---|
| Stream | stream | Stream that contains the worksheet. |
| FileFormat | format | C1.WPF.Excel.C1XLBook.FileFormat value that specifies the file format. |
Loading the worksheets without their data is much faster than loading the entire workbook. This is useful in situations where you want to examine the contents of the file (for example, to ensure that you will not overwrite an existing sheet).
Loads the worksheet from a stream.
public void Load(Stream stream, FileFormat format, bool fillSheets)
Public Sub Load(stream As Stream, format As FileFormat, fillSheets As Boolean)
| Type | Name | Description |
|---|---|---|
| Stream | stream | Stream that contains the worksheet. |
| FileFormat | format | C1.WPF.Excel.C1XLBook.FileFormat value that specifies the file format. |
| bool | fillSheets | True to load data into the sheets; False to read the sheet names only. |