Hello Team,
I forgot to add that we are using Aspose Java Cells.
Hi Charles,
Workbook workbook = new Workbook();
//Access first sheet
Worksheet worksheet = workbook.getWorksheets().get(0);
//Add a picture inside cell at this row and column
int picId = worksheet.getPictures().add(0, 0, dir + “image.png”);
Picture pic = worksheet.getPictures().get(picId);
//Set the height of the first row
worksheet.getCells().setRowHeightPixel(0, pic.getHeight()); //height equals to picture height
//Set the width of the first and second column
worksheet.getCells().setColumnWidthPixel(0, pic.getWidth());
//Save the file
workbook.save(dir+“output.xlsx”);