DataRangeEx::DataRangeEx

Description

Default constructor for the DataRangeEx class.

Syntax

DataRangeEx( )

DataRangeEx( TreeNode & tr, bool bUpdateTree = false )

Parameters

tr
bUpdateTree

Return

Examples

EX1

//Construct a DataRangeEx with a block, a whole column and a whole row.
void DataRange_DataRangeEx_Ex1()
{
    DataRangeEx dr; // Default constructor
    double rr;
    Worksheet wks;
    wks.Create("Origin");
 
    if( wks )
    {
        while(wks.Columns(0))
            wks.DeleteCol(0);
 
        wks.AddCol("A");
        wks.AddCol("B");
        wks.AddCol("C");
        for(int i=0;i<3;i++)
        {
          for(int j=0;j<10;j++)
              {   
                                rr=rnd();
                wks.SetCell(j, i, 100*rr);
             }
        }
        dr.Add(wks, 0, 0, 1, 1, "Range1");  // A block
        dr.Add(wks, 3, 0, 3, -1, "Range2"); // A whole row ( row 4) 
        dr.Add(wks, 0, 2, -1, 2, "Range3"); // A whole col (column C)
 
        Tree tr;
        TreeNode trDataRange = tree_check_get_node(tr, IMPTREE_NODE_DATA_RANGE);
        dr.GetTree(trDataRange);
        dr.Destroy();
        out_tree(trDataRange);
 
        DataRangeEx dr2; // Default constructor
        if(dr2.Create(trDataRange) )
                out_str("Success!");
    }
}

Remark

See Also

DataRange::DataRange,XYRange::XYRange,XYZRange::XYZRange

header to Include

origin.h