判断在Excel选择区域的行数列数程序如下:
// 选择区域列数
int nSelColCount = 0;
MSExcel::RangePtr pSelCols = pSelRange->GetColumns(); // 选择区域 --- 列
nSelColCount = pSelCols->GetCount ();
// 选择区域行数
int nSelRowCount = 0;
MSExcel::RangePtr pSelRows = pSelRange->GetRows(); // 选择区域 --- 行
nSelRowCount = pSelRows->GetCount ();