[]
Opens the specified file and determines whether it meets the minimal requirements to be considered an Excel file.
public bool IsExcelFile(string fileName)
Public Function IsExcelFile(fileName As String) As Boolean
Type | Name | Description |
---|---|---|
string | fileName | String that contains the path and file name |
Type | Description |
---|---|
bool | Boolean: true if it is an Excel file; false otherwise |
Opens the specified file and determines whether it meets the minimal requirements
to be considered a structured storage file containing an Excel workbook.
public bool IsExcelFile(string fileName, ref ExcelWorkbookType workbookType, out bool isEncrypt)
Public Function IsExcelFile(fileName As String, ByRef workbookType As ExcelWorkbookType, ByRef isEncrypt As Boolean) As Boolean
Type | Name | Description |
---|---|---|
string | fileName | Path and name of file |
ExcelWorkbookType | workbookType | Returns the type of Excel workbook |
bool | isEncrypt | Returns true the file is encrypted; false otherwise |
Type | Description |
---|---|
bool |
Type | Condition |
---|---|
FileNotFoundException | Specified file is not found |
ArgumentNullException | No file name is specified (or specified file name is null) |
ArgumentException | No file name is specified (or specified file name is empty) |
Opens the specified file and determines whether it meets the minimal requirements
to be considered a structured storage file that contains an Excel workbook.
public bool IsExcelFile(string fileName, ref ExcelWorkbookType workbookType)
Public Function IsExcelFile(fileName As String, ByRef workbookType As ExcelWorkbookType) As Boolean
Type | Name | Description |
---|---|---|
string | fileName | Path and name of file |
ExcelWorkbookType | workbookType | Returns the type of Excel workbook |
Type | Description |
---|---|
bool |
Type | Condition |
---|---|
FileNotFoundException | Specified file is not found |
ArgumentNullException | No file name is specified (or specified file name is null) |
ArgumentException | No file name is specified (or specified file name is empty) |