Free Support Forum - aspose.com

Worksheet getZoom() returns wrong value

Hello.

I have found, that for certain cases, Worksheet#getZoom() method returns wrong result. Following example contains the book with 100% zoom ratio and test

    @Test
public void zoomTest() throws Exception {
    Workbook workbook = new Workbook("D://in.xlsx");
    assertEquals("Zoom", 100, workbook.getWorksheets().get(0).getZoom());
}

Assertion fails, because getZoom() return 60
in.zip (21.0 KB)

Best regards. Alexey

I found, that zoom depends on view settings (excel allows save different zoom ratio for different view mode)

Please close this topic. I can’t reproduce wrong behavior

Best regards. Alexey

@makarovalv,

Good to know that your issue is sorted out. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.