2.1.7.12 okxf_resolve_tree_construct_range


Description

Construct data range by tree

Syntax

BOOL okxf_resolve_tree_construct_range( TreeNode * pTr, DataRange * pDr )

Parameters

pTr
[input] point to the TreeNode containing the range data
pDr
[output] pointer to receive the DataRange

Return

TRUE if successful otherwise FALSE

Examples

EX1

#include <GetNbox.h>
#include <xfutils.h>

void okxf_resolve_tree_construct_range_ex()
{
    GETN_BOX(trRoot)
    GETN_XYRANGE(Input, "Input Data", 2, "[Book1]Sheet1!((D1,F1),(G1,H1),(I1,E1),(A,B))")
    if ( GetNBox(trRoot) )
    {
        out_tree(trRoot);
        
        TreeNode trRange = trRoot.Input;        
        XYRange dr;
        okxf_resolve_tree_construct_range(&trRange, &dr);
        
        foreach(TreeNode tn in trRange.Range1.Children)
        {
            vector vv;
            okxf_resolve_tree_get_data_into_vector(&tn, &vv);
        }
    }
    return;
}

Remark

See Also

okxf_resolve_tree_get_data_into_vector

Header to Included

xfutils.h

Reference