【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.9.11 DataRange::GetDescription
Contents
Description
Get a text string to describe a data range.
Syntax
string GetDescription( DWORD dwCntrl = 0, LPCSTR lpcszPrefix = NULL, LPCSTR lpcszSep = NULL );
Parameters
- dwCntrl
- [input] provide options on the string construction. The following bits are supported
- GETLC_DATAPLOTS : return empty string if DataRange is not part of a data plot, otherwise return [Graph]Layer!Plot(n)
- GETLC_NO_DESIGNATIONS : used only if GETLC_DATAPLOTS not set, to skip (X) (Y) and also not to add extra spaces
- GETLC_NO_ROWS : skip the [4:50] part
- lpcszPrefix
- [input] The prefix string.
- lpcszSep
- [input] The seperator string.
Return
Returns the description of the DataRange
Examples
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); } }
Remark
See Also
Header to Include
origin.h