Hi,
Recently, some methods like com.aspose.cells.Cells#getColumnWidthInch
have been marked as deprecated, with the suggestion to use com.aspose.cells.Cells#getColumnWidth(int, boolean, int)
instead.
However, it is not clear to me, what the second boolean parameter isOriginal
means. Perhaps there is some documentation available that you can point me to?
In which cases will the return value differ between true
or false
for isOriginal
, and how will it differ?
Thanks in advance,
Taras
@TarasTielkes
Could you please clarify what specific information you are looking for regarding the ‘isOriginal’ parameter in the method com.aspose.cells.Cells#getColumnWidth(int, boolean, int)?
@TarasTielkes,
In the method overload, the second Boolean parameter denotes the column’s width as originally defined/saved in the source XML of the workbook, or without considering any changes made (either programmatically or through user interaction). Moreover, MS Excel itself applies auto-fit operation for specific columns when opening the Excel file into it.
Hi @amjad.sahi,
Which variant was the old (now deprecated) method com.aspose.cells.Cells#getColumnWidthInch
returning?
Thanks,
Taras
@TarasTielkes,
See an example line of code:
worksheet.getCells().getColumnWidth(0, false, CellsUnitType.INCH);
@TarasTielkes
"isOriginal " only works when rows or columns are hidden:
0 will return if “isOriginal” is false;
original height or width will be return if “isOriginal” is true;