Spread 8.0 Documentation
SetFloat Method
Support Options
ActiveX Reference > ActiveX Methods > SetFloat Method

Glossary Item Box

SetFloat Method


See Also    DLL

Applies To

fpSpread control

Description

Sets the value for a currency, number, or percent cell using a floating-point value.

Syntax

C++

BOOL CSpreadSheet::SetFloat(long Col, long Row, double Value);

Visual Basic

fpSpread.SetFloat(ByVal Col As Long, ByVal Row As Long, ByVal Value As Double) As Boolean

Parameters

The following parameters are available:

Parameter Description
Col Column number of cell
Row Row number of cell
Value Floating-point value

Remarks

Use the SetFloat method to set the value of a currency, number, percent, or scientific cell as a numeric value. The Clip, ClipValue, Text, and Value properties set the value in a cell as a string. For more information about using these properties and method, see Adding Data.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

The SetFloat method sets the floating-point value of a cell if the cell type is currency, number, or percent. For percent cells, the number set by the method is multiplied by 100 to be displayed as a percent. For example, setting the Value parameter to 7 displays "700%" in the cell. To display "7%" in a cell, set the Value parameter to 0.07.

If you set the Col or Row parameter to –1 to set data for multiple cells, the same data is placed in each cell.

Return Type

True if the floating-point value is set; otherwise, the method returns False.

See Also

Adding Data

Clip, ClipValue, Sheet, Text, Value properties

GetFloat, SetText methods

DLL Correspondence

SSSetFloat function

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