Get worksheet capacity columns and rows

Add-in Express™ Support Service
That's what is more important than anything else

Get worksheet capacity columns and rows
WHat is the last column 
Micha? G??bowski


Guest


Dear Sirs,
What is the best way to get last allowable column and row number in worksheet?
When I open xls there are max 256 columns, xlsx allows 16384, may be in the future it will be more.
What is the best way to get MAX_COL and MAX_ROW values?
Michal
Posted 16 Mar, 2016 05:01:00 Top
Micha? G??bowski


Guest


Probably I've already answered myself:
class function THelper.CellsCapacity: TPoint;
begin
  Result.X := _Worksheet(ExcelApp.ActiveWorkbook.Worksheets[1]).Columns.Count; // 256;
  Result.Y := _Worksheet(ExcelApp.ActiveWorkbook.Worksheets[1]).Rows.Count; // 65536;
end;

Regards.
Posted 16 Mar, 2016 06:27:14 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Micha?,

Thank you for posting the answer!



Andrei Smolin
Add-in Express Team Leader
Posted 16 Mar, 2016 08:54:33 Top