Hello.
I found that recently was added method for getting original width for collapsed columns.
It was in Need to know an original width of a hidden column in pixels and was added in version Aspose.Cells 24.2
I have a similar situation but for row height.
I need to know what was the original height (in pixels) of the row before it has been collapsed.
I try to use method
sheet.getCells().getRowHeightPixel(column)
it returns zero.
Method
sheet.getCells().checkRow(column).getHeight()
returns the original column width as double value but I need in pixels.
Can you add the same method for the height of collapsed rows as for the width of collapsed columns ?
@MasteRMR
Would you like to zip and attach your sample Excel file and give us row index to which you are trying to get height in pixels via the method. We will check it soon. We have created a ticket to track getting column width and row height in pixels.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45881
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
You can get that attachment
test.zip (5.7 KB)
I want to get original height in pixels for collapsed cells in group (from 4 to 6 row)
Simple test for this
@Test
public void hidden_row_height() throws Exception {
Workbook workbook = new Workbook("C://test.xlsx");
Cells cells = workbook.getWorksheets().get(0).getCells();
//Original row height
//Row 3 - visible
System.out.println("Row 3: getRowHeightPixel = " + cells.getRowHeightPixel(2));
System.out.println("Row 3: checkRow.getHeight = " + cells.checkRow(2).getHeight());
//Row 4 - collapsed hidden
System.out.println("Row 4: getRowHeightPixel = " + cells.getRowHeightPixel(3));
System.out.println("Row 4: checkRow.getHeight = " + cells.checkRow(3).getHeight());
}
@MasteRMR
By using sample files and code for testing, we can reproduce the issue. Found getting an incorrect original height of a hidden row in pixels when calling Row.getHeight().
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45882
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@MasteRMR
1). Please try the following codes to get the original row height of the hidden row:
System.out.println("Row 4: getRowHeightPixel =" + cells.getRowOriginalHeightPoint(3) *96 /72);
2). We will add Cells.getColumnOriginalWidthPoint(column) in the next version.
The issues you have found earlier (filed as CELLSJAVA-45881) have been fixed in Aspose.Cells for Java 24.4.