[]
        
(Showing Draft Content)

FarPoint.Win.Spread.FpSpread.IsExcelStream

IsExcelStream Method

IsExcelStream(Stream, ref ExcelWorkbookType)

Opens the specified file and determines whether it meets the minimal requirements
to be considered a stream that contains an Excel workbook.

Declaration
public bool IsExcelStream(Stream stream, ref ExcelWorkbookType workbookType)
Public Function IsExcelStream(stream As Stream, ByRef workbookType As ExcelWorkbookType) As Boolean
Parameters
Type Name Description
Stream stream

Stream

ExcelWorkbookType workbookType

Workbook type

Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

No stream specified or specified stream is null

ArgumentException

No stream specified or specified stream is empty

IsExcelStream(Stream)

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

Declaration
public bool IsExcelStream(Stream stream)
Public Function IsExcelStream(stream As Stream) As Boolean
Parameters
Type Name Description
Stream stream

Stream

Returns
Type Description
bool

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

IsExcelStream(Stream, ref ExcelWorkbookType, out bool)

Opens the specified file and determines whether it meets the minimal requirements
to be considered a stream that contains an Excel workbook.

Declaration
public bool IsExcelStream(Stream stream, ref ExcelWorkbookType workbookType, out bool isEncrypt)
Public Function IsExcelStream(stream As Stream, ByRef workbookType As ExcelWorkbookType, ByRef isEncrypt As Boolean) As Boolean
Parameters
Type Name Description
Stream stream

Stream

ExcelWorkbookType workbookType

Workbook type

bool isEncrypt

isEncrypt

Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

No stream specified or specified stream is null

ArgumentException

No stream specified or specified stream is empty