2.2.4.10.5 DataRangeEx::PrepareTreePrepareTree
Description
Get the information tree of the DataRange.
Syntax
void PrepareTree( TreeNode & tr )
Parameters
- tr
- [Output] containing the information of the datarange.
Return
Examples
//Get the information tree of the DataRange.
void DataRangeEx_PrepareTree_Ex1()
{
//assume the active workbooka sheet and has least four columns before run this code.
Worksheet wks = Project.ActiveLayer();
if ( !wks )
{
printf("Can not find any active worksheet!");
return;
}
DataRange dr;
dr.Create();//init the object
dr.Add("X", wks, 0, 0, -1, 0);
dr.Add("Y", wks, 0, 1, -1, 1);
dr.Add("X", wks, 0, 2, -1, 2);
dr.Add("Y", wks, 0, 3, -1, 3);
Tree trData;
dr.GetTree(trData);
DataRangeEx drEx;
drEx.Create(trData, true);
Tree trPrepare;
drEx.PrepareTree(trPrepare);
return;
}
Remark
See Also
Header to Include
origin.h
|