2.2.4.46.35 Worksheet::GetHideStatus


Description

Get all rows/columns hide status.

Syntax

int GetHideStatus( BOOL bRow, vector<bool> & vbHide, int nBegin = 0, int nEnd = -1, BOOL bLabel = FALSE )

Parameters

bRow
[input] true is for rows, false is for columns
vbHide
[output] hide status, true is hidden
nBegin
[input] begin index, 0-offset
nEnd
[input] end index, 0-offset
bLabel
[input] True to include label area, meanwhile nEnd cannot less than 0. Not Recommend and we recommende Grid::GetShowLabels

Return

the number of hidden rows

Examples

EX1

void GetHideStatus_ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if(!wks)
        return;
    int nn = wks.GetHideStatus(TRUE, NULL);
    out_int("Hidden rows: ", nn);
}

void GetHideStatus_ex2()
{
    Worksheet wks = Project.ActiveLayer();
    if(!wks)
        return;
    
    vector<bool> vbHide;
    if(wks.GetHideStatus(TRUE, vbHide, 0, 9) <= 0)//get row 1~10 hide status
        return;
    
    out_str("Hidden rows:");
    for(int ii = 0; ii < vbHide.GetSize(); ii++)
    {
        if( vbHide[ii] )
            out_int("", ii+1);//1 offset
    }
}

Remark

See Also

Header to Included

origin.h