excel 类获取起始列和使用列

m_excel.OpenWorkBook(sFileName, sSheetDrawingList);
// Get drawing info
int iStartRow = 0, iStartCol = 0, iRowNum = 0, iColNum = 0;
_ExRange range;
_ExRange usedRange;
usedRange.AttachDispatch(m_excel.GetSheet().GetUsedRange());

iStartRow = usedRange.GetRow();
iStartCol = usedRange.GetColumn();

range.AttachDispatch(usedRange.GetRows()) ;
iRowNum = range.GetCount();

range.AttachDispatch(usedRange.GetColumns()) ;
iColNum = range.GetCount();

posted @   xzh1993  阅读(244)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示