Hi,
In the following code toImage method hangs indefinitely:
public class ChartExportTest {
public void chartExportTest() throws Exception {
Workbook wb = new Workbook(“d:\test.xlsx”);
Worksheet sheet = wb.getWorksheets().get(0);
for (int i = 0; i < sheet.getCharts().getCount(); i++) {
Chart chart = sheet.getCharts().get(i);
FileOutputStream out = new FileOutputStream(new File(“d:\chart2.png”));
try {
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setImageFormat(ImageFormat.getPng());
options.setHorizontalResolution(800);
options.setVerticalResolution(600);
chart.toImage(out, options);
} finally {
out.close();
}
}
}
}
I have attached test XLSX file.
Could you scrutinize and fix this bug.
Thanks.