[]
        
(Showing Draft Content)

FarPoint.Web.Spread.FpSpread.IsExcelStream

IsExcelStream Method

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 containing 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

Returns the type of Excel workbook

bool isEncrypt

If set to true excel data is encrypted.

Returns
Type Description
bool

true if the specified stream contains excel data; otherwise, false.

Exceptions
Type Condition
ArgumentNullException

No stream specified or specified stream is null

ArgumentException

No stream specified or specified stream is empty