// Create a new workbook Workbook workbook = new Workbook(); // Open an excel file InputStream fileStream = this.getResourceStream("xlsx/Sport sign-up sheet.xlsx"); workbook.open(fileStream); IWorksheet worksheet = workbook.getWorksheets().get(0); // Get the absolute location and size of the Range["G1"] in the worksheet. IRange range = worksheet.getRange("F1:G1"); Rectangle rect = com.grapecity.documents.excel.CellInfo.GetRangeBoundary(range); // Add the image to the Range["G1"] InputStream stream = this.getResourceStream("logo.png"); try { worksheet.getShapes().addPictureInPixel(stream, ImageType.PNG, rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); } catch (IOException e) { // Log ignored error of your code // log.debug(e.getMessage()); } // Save to an excel file workbook.save("GetRangeBoundary.xlsx");