Hi,
Hi,
Please try the latest fix: v7.0.2.3. I have tested using the following code with a template file and it works fine regarding setPrintGridlines() method.<o:p></o:p>
Sample code:
Workbook workbook = new Workbook(“e:\test\Book1.xls”);
PageSetup pagesetup = workbook.getWorksheets().get(1).getPageSetup();
pagesetup.setPrintGridlines(true);
workbook.save(“output.xls”);
Thank you.
Hi Amjad, Thanks for the speedy fix. It works partially - there is now a border around three sides of the print area but no gridlines between the cells. I’ve attached the output and included my code below: Worksheet sheet = wb.getWorksheets().get(0); Cells cells = sheet.getCells(); options.setOnePagePerSheet(true); PageSetup ps = sheet.getPageSetup(); ps.setPrintArea(A1:C10); SheetRender sr = new SheetRender(sheet, options); float[] wh = sr.getPageSize(0); // in points BufferedImage image = new BufferedImage((int) Math.ceil(wh[0] / 72f * 96f), (int) Math.ceil(wh[1] / 72f * 96f), BufferedImage.TYPE_INT_RGB); sr.toImage(0, image.createGraphics()); ImageIO.write(image, “png”, new File(“sample.png”));
Hi,
Is worksheet.setGridlinesVisible the setting I should be using? It also has no effect
Hi,
Hi Amjad,
The issues you have found earlier (filed as CELLSJAVA-40014) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.