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




Posts: 42
Joined: 2015-06-08
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




Posts: 42
Joined: 2015-06-08
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: 14140
Joined: 2006-05-11
Hello Michał,

Thank you for posting the answer!

Regards from Belarus (GMT+3),‎

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