Aller au contenu principal

ExcelGetCellAsBoolean

Structure

ExcelGetCellAsBoolean(iRow,iCol)

Type

Function

Description

This function returns the equivalent to the boolean value of the cell or formula result, if possible. '0' is returned for false, '1' for true. It will throw an exception otherwise.

Parameters: 2

iRow = The row of the cell. 1 is the top row.

iCol = The column of the cell. 1 corresponds to column A

Example

Try

ExcelNewFile(3,"v2003")

ExcelGetSheetByIndex(1)

ShowMessage(ExcelGetCellIsBoolean(1,1)) 'Returns "0"

ExcelSetCellAsBoolean(1,1,true)

ShowMessage(ExcelGetCellAsBoolean(1,1)) 'Returns "1"

Except

ShowMessage(LastExceptionMessage)

End Try