[]
        
(Showing Draft Content)

FarPoint.Web.Spread.FpSpread.IsExcelFile

IsExcelFile Method

IsExcelFile(string)

Opens the specified file and determines whether it meets the minimal requirements to be considered an Excel file.

Declaration
public bool IsExcelFile(string fileName)
Public Function IsExcelFile(fileName As String) As Boolean
Parameters
Type Name Description
string fileName

String that contains path and name of file

Returns
Type Description
bool

Boolean: true if it is an Excel file; false otherwise

IsExcelFile(string, ref ExcelWorkbookType, out bool)

Opens the specified file and determines whether it meets the minimal requirements
to be considered a structured storage file containing an Excel workbook.

Declaration
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
Parameters
Type Name Description
string fileName

Path and name of file

ExcelWorkbookType workbookType

Returns the type of Excel workbook

bool isEncrypt

Returns true if the file is encrypted; false otherwise

Returns
Type Description
bool
Exceptions
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)