// Create a png file stream FileOutputStream outputStream = null; try { outputStream = new FileOutputStream("ConvertShapeToImage.png"); } catch (FileNotFoundException e) { e.printStackTrace(); } // Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); // Add a oval IShape oval = worksheet.getShapes().addShape(AutoShapeType.Oval, 0, 0, 191, 194); // Set soild fill for oval oval.getFill().getColor().setRGB(Color.GetOrangeRed()); // Save the shape as image to a stream. oval.toImage(outputStream, ImageType.PNG); // Close the file stream try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); }