GetDescription
Get a text string to describe a data range.
string GetDescription( DWORD dwCntrl = 0, LPCSTR lpcszPrefix = NULL, LPCSTR lpcszSep = NULL );
Returns the description of the DataRange
EX1
//This example will output the description of the Datarange associated to worksheet's col(A) and col(B). #include <Range.h> void DataRange_GetDescription_Ex1(int nCol1 = 0, int nCol2 = 1) { Worksheet wks ; wks.Create(); if( wks ) { while(wks.Columns(0)) wks.DeleteCol(0); wks.AddCol("A"); wks.AddCol("B"); double rr; for(int j=0;j<2;j++) { for (int i=0;i<10;i++) { rr=rnd(); wks.SetCell(i,j,rr*100); } } DataRange dr; dr.Add("X", wks, 0, nCol1, -1, nCol1); dr.Add("Y", wks, 0, nCol2, -1, nCol2); dr.SetName("This is a Long Name for the Range"); string strName = dr.GetName(); string strDescription = dr.GetDescription(); out_str(strDescription); } }
origin.h