Optimal Height/Width functionality lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- backprop · 2024-09-02 10:33 Is there Optimal Height/Width functionality for selected column/row? I'm using this quite a bit in LibreOffice Calc, due quite different length of the data. And now I would need to know is it possible to do that from the code. ---------------------------------------------------------------------- wp · 2024-09-02 10:45 Quote from: backprop on September 02, 2024, 12:33:11 pmIs there Optimal Height/Width functionality for selected column/row? As far as the elemental non-visual library FPSpreadsheet is concerned: no, because this library does not know about the metrics of the fonts. However, when you use the visual TsWorksheetGrid, there are functions AutoColWidth(ACol: Integer) and AutoRowHeight(ARow: Integer). But note that after opening the saved files in Calc these auto-determined sizes can be off by a few pixels because Calc and Excel add some margin to the cell dimension, and I did not find out how this is calculated.