UsedRange
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi All I have a problem to get rows and column in excel.i use code this for get rows and column.
long row,col;
Excel::Ranger pRange = sheet1->UsedRange;
COleSafeArray sare(pRange->GetValue());
sare.GetUBound(1,&row);
sare.GetUBound(2,&col);it's working fine for me.But when excel sheet content start from row 2 and column 23(row 2 and column 23 taken as a example),then row and col show "1".But actual range is row=2 and col=23.How can i get the row and col actual range.Plz help me