[Lazarus] fpspreadsheet - automatic column width

Werner Pamler werner.pamler at freenet.de
Tue Mar 22 17:24:02 CET 2016


Am 22.03.2016 um 16:16 schrieb Roberto P.:
> To make it work well enough, I am still missing one point: is there a 
> way to detect which is the last used row in a column or the last used 
> column in a row?
> A single cell is "not enough".
TsWorksheet.GetLastOcccupiedRowIndex, GetLastOccupiedColIndex determine 
the indexes of the last cell of the worksheet.

There's also a  TsWorksheet.GetLastRowIndex, GetLastColIndex which 
consider also Row and Column records (needed for predefined row heights 
and column widths) beyond the last occupied cell. Both have an optional 
parameter "ForceCalculation" which you should set to true in your first 
call in order to initialize the cached value.




More information about the Lazarus mailing list