Hi @ahsaniqbalsidiqui,
Thanks for the response.
Can you give me an estimate on how long will take to resolve this problem?
I have another problem when I set the cell width and height the result is not correct.
final Workbook template = new Workbook();
final Worksheet worksheet = template.getWorksheets().get(0);
final Cell cell = worksheet.getCells().get(0, 0);
final URL url = new URL(“http://i.imgur.com/nPfNFVq.jpg”);try (InputStream is = url.openStream()) {
byte[] imageData = IOUtils.toByteArray(is);final int index = worksheet.getPictures()
.add(cell.getRow(), cell.getColumn(), cell.getRow() + 1, cell.getColumn() + 1,
new ByteArrayInputStream(imageData));final Picture pic = worksheet.getPictures().get(index);
pic.setLinkedCell(cell.getName());worksheet.getCells().setColumnWidthPixel(0, 971);
worksheet.getCells().setRowHeightPixel(0, 546);System.out.println(“Cell width: " + worksheet.getCells().getColumnWidthPixel(0) + " px”);
System.out.println(“Cell height: " + worksheet.getCells().getRowHeightPixel(0) + " px”);System.out.println();
System.out.println(“Pic width: " + pic.getWidth() + " px”);
System.out.println(“Pic height: " + pic.getHeight() + " px”);pic.setPlacement(PlacementType.MOVE);
}template.save(“result.xlsx”);
Basically, I’m inserting an image inside a cell. I want the image to have a certain size (971x546 px) and the cell to fit the image. This code made this with Aspose Cells 17.7, now with 19.2 is not working. The cell is wider than the image, even thougth, according to the printed values, they should have the same size.
Any thoughts on this problem?
Best regards,
Hugo Freixo