Dataset::GetText

Description

Get the text value of a cell in an Origin data set of type Text & Numeric.

Syntax

BOOL GetText( int nRow, string & strTextVal )

Parameters

nRow
[input] Row number (O based offset) of an Origin data set whose text value is returned.
strTextVal
[output] Returned text value

Return

Returns TRUE on successful exit and FALSE on failure.

Examples

EX1

void Dataset_GetText_ex1()
{
    // a Worksheet with 2 columns must exist prior to execution and must have text in column A 
    string strTextVal;
    Worksheet wks=Project.ActiveLayer();
    if (wks)
    { 
        Dataset dsTextA(wks,0);  
        Dataset dsTextB(wks, 1);
        for(int ii = 0; ii < 3; ii++)            
        {
            dsTextA.GetText(ii,strTextVal); // Get text value in column A
            dsTextB.SetText(ii,strTextVal); // Set text value in column B
        }
    }
}

Remark

Get the text value of a cell in an Origin data set. The Origin data set must be of type Text & Numeric.

See Also

Dataset::SetText, Worksheet::GetCell, Datasheet::SetCell, Datasheet::Cell, Datasheet::TCell

header to Include

origin.h