Column::GetStringArray

Description

Get the contents (from row nRow1 to nRow2) from a Column regardless of its data type.

Syntax

BOOL GetStringArray( vector<string> & as, int nRow1 = 0, int nRow2 = -1, BOOL bFullPrecision = true, BOOL bMissingAsBlank = true, DWORD dwCntrl = 0 )

Parameters

as
[output] output StringArray.
nRow1
[input] starting row number, default 0.
nRow2
[input] ending row number, default -1 means to upper bound of Column
bFullPrecision
false will get text as displayed, true will get numeric into highest possible precision.
bMissingAsBlank
false will get numeric missing values as "--", true will get them as "".
dwCntrl
[input] Options defined in OC_Const.h : CGSA_CHECK_IGNORE_HIDDEN_ROW, etc.

Return

Returns TRUE on successful exit and FALSE on failure.

Examples

EX1

void Column_GetStringArray_Ex1()
{
    Worksheet wks=Project.ActiveLayer();
    if (wks)
    {
        Column cc(wks, 0);
        StringArray sa1, sa2;
        bool bRet = wks.Columns(0).GetStringArray(sa1, 2, 5);
        bRet = wks.Columns(1).GetStringArray(sa2);
        bRet = wks.Columns(1).PutStringArray(sa1, 3);
        bRet = wks.Columns(2).PutStringArray(sa2);
    }
}

Remark

See Also

Column::PutStringArray

header to Include

origin.h