Column::PutStringArray

Description

Put (copy) the contents of a StringArray to a Column starting in row nRow1.

Syntax

BOOL PutStringArray( const vector<string> & as, int nRow1 = 0, BOOL bCheckConvertNumeric = false )

Parameters

as
[input] StringArray to copy.
nRow1
[Input] starting row number of destination Column.
bCheckConvertNumeric
[input] TRUE will check each entry and if the string is in numeric form, then put into the corresponding cell as Numeric. FALSE will put into cells as text regardless.

Return

Returns TRUE on successful exit and FALSE on failure.

Examples

EX1

void Column_PutStringArray_Ex1()
{
    // This test function assumes a worksheet with 3 columns 
    // first Column should have some number of text entries
    Worksheet wks = Project.ActiveLayer();
    if (wks)
    { 
        StringArray sa1, sa2;
        BOOL bRet;
        bRet = wks.Columns(0).GetStringArray(sa1, 2, 5);
        bRet = wks.Columns(1).GetStringArray(sa2);
        bRet = wks.Columns(1).PutStringArray(sa2, 3);
        bRet = wks.Columns(2).PutStringArray(sa2);
    }
}

Remark

See Also

Column::GetStringArray

header to Include

origin.h