The Range obtained when MFC reads and writes XLS. The actual area may be larger than the actual valued area, and the data validity judgment (row and column) is required when taking the cell value.

range = sheet.get_UsedRange();
range.AttachDispatch(range.get_Rows());
long RowNum = range.get_Count();
range.AttachDispatch(range.get_Columns());
long ColNum = range.get_Count();

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324604916&siteId=291194637