Spread 8.0 Documentation
SSGetFloat, SSSetFloat, SSSetFloatRange Functions
Support Options
DLL Reference > DLL Functions > SSGetFloat, SSSetFloat, SSSetFloatRange Functions

Glossary Item Box

SSGetFloat, SSSetFloat, SSSetFloatRange Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return the floating-point value for a currency, number, or percent cell or set the floating-point value for a block of currency, number, or percent cells.

Syntax

C

BOOL SSGetFloat(HWND hWnd, SS_COORD Col, SS_COORD Row, LPDOUBLE lpdfValue);

BOOL SSSetFloat(HWND hWnd, SS_COORD Col, SS_COORD Row, DOUBLE dfValue);

BOOL SSSetFloatRange(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, double dfValue);

C++

BOOL TSpread::GetFloat(SS_COORD Col, SS_COORD Row, LPDOUBLE lpdfValue);

BOOL TSpread::SetFloat(SS_COORD Col, SS_COORD Row, double dfValue);

BOOL TSpread::SetFloatRange(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, double dfValue);

Parameters

The SSGetFloat function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell
Row Row number of cell
lpdfValue Pointer to variable that receives floating-point value

The SSSetFloat and SSSetFloatRange functions have the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell or column number of upper-left cell of the block if specifying a block for the SSSetFloatRange function
Row Row number of cell or row number of upper-left cell of the block if specifying a block for the SSSetFloatRange function
Col2 Column number of lower-right cell of the block if specifying a block for the SSSetFloatRange function
Row2 Row number of lower-right cell of the block if specifying a block for the SSSetFloatRange function
dfValue Floating-point value

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

If you set the Col or Row parameter to SS_ALLCOLS or SS_ALLROWS to set data for multiple cells or you call the SSSetFloatRange function, the same data is placed in each cell. If you set the Col or Row parameter to SS_ALLCOLS or SS_ALLROWS to return data from multiple cells, unless the cells were set with the Col or Row parameter set to SS_ALLCOLS or SS_ALLROWS, the function does not return a value.

Remarks

Call the SSGetFloat function to return the value of a currency, number, or percent cell as a numeric value. The SSClipOut, SSClipValueOut, SSGetData, and SSGetValue functions return the value in a currency, number, or percent cell as a string. For more information about using these properties and methods, see Returning Data.

The SSGetFloat function returns the floating-point value of a cell if the cell type is currency, number, or percent. For percent cells, the value is stored as the decimal equivalent of the percent value. The cell displays the decimal value multiplied by 100. The SSGetFloat function returns the decimal equivalent. For example, if the cell displays "7%", the function returns the value 0.07.

Use the SSSetFloat function to set the value of a currency, number, or percent cell as a numeric value. The SSClipIn, SSClipValueIn, SSSetData, and SSSetValue functions set the value in a currency, number, or percent cell as a string.

Use the SSSetFloatRange function to specify the floating-point values for a block of cells.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

Adding Data
Returning Data

SSClipIn, SSClipOut, SSClipValueIn, SSClipValueOut, SSGetData, SSGetInteger, SSGetValue, SSSetData, SSSetInteger, SSSetIntegerRange, SSSetSheet, SSSetValue, SSSetValueRange functions

ActiveX Correspondence

SSGetFloat: GetFloat method

SSSetFloat: SetFloat method

SSSetFloatRange: SetFloat method

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.