We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Worksheet zoom and rowHeight in Java

Hello. I have founded, that your api implements zoom factor for a worksheets, but it not affect cell's size (in pixels too). Is there a way for recalculate cell's size after zoom applying?

Following test print

Height 29.0
Height 29.0

But i expect, that second value will be smaller than first (after zooming, height in pixels should be decreased)


public void zoomingTest() throws Exception {

Workbook workbook = new Workbook("D://test.xlsx");

Worksheet worksheet = workbook.getWorksheets().get(0);

Cells cells = worksheet.getCells();

double height = cells.getRowHeightPixel(2);

System.out.println("Height " + height);


height = cells.getRowHeightPixel(2);

System.out.println("Height " + height);


Hi Alexey,

Thank you for contacting Aspose support.

Please note, changing the Zoom factor for a worksheet does not change the row heights & column widths. Zoom only changes the view of the worksheet by making the grid larger or smaller as per defined zoom factor whereas the actual row heights & column widths remain the same. You may confirm this by manually changing the zoom of a worksheet within the Excel application. Moreover, you may also check this from the worksheet XML file before and after setting the zoom on the particular worksheet.