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

Glossary Item Box

GetText Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Returns the text of the specified cell.

Syntax

C++

BOOL CSpreadSheet::GetText (long Col, long Row, VARIANT* Var);

Visual Basic

fpSpread.GetText(ByVal Col As Long, ByVal Row As Long, Var As Variant) As Boolean

Parameters

The following parameters are available:

Parameter Description
Col Column number of cell
Row Row number of cell
Var Text in cell

Remarks

Use this method as a concise way to return data. You can also return data from cells using the Clip, ClipValue, Text, and Value properties, and the GetFloat and GetInteger methods. This method returns data from a cell as a data type determined by the content of the cell. For more information about using these properties and methods, see Returning 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 following table explains the data format returned when returning data using the GetText method. In the table, values in quotation marks (" ") are string values.

Cell Type Sample Data Returns
Button True (Two-state) "1"
False (Two-state) "0"
Not set (Two-state; looks False) Empty string
Check Box True "1"
False "0"
Grayed "2"
Not set; looks False Empty string
Combo Box   Text string of selected item
Date "10/29/2001" "10/29/2001"
Edit   Text string
Owner-Drawn not applicable
Percent "15%" 0.15
PIC "22-45-76" "22-45-76"
Picture not applicable
Scientific "2.22E+05" "2.22E+05"
Static Text   Text string
Time "11:25:03 pm" "11:25:03 pm"

If you set the Col or Row parameter to –1 to return data from multiple cells, unless the cells were set with the Col or Row parameter set to –1, the method does not return a value.

Return Type

True if successful; otherwise, False.

See Also

Returning Data

Clip, ClipValue, Sheet, Text, Value properties

GetFloat, GetInteger, SetText methods

DLL Correspondence

SSGetData, SSGetFloat, SSGetInteger functions

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