Converting Worksheet to Image and Worksheet to Image by Page

Using Aspose.Cells to Convert Worksheet to Image File

This article shows how to use the Aspose.Cells for Java API to convert a worksheet to an image. The API provides several valuable classes, such as SheetRender, ImageOrPrintOptions, WorkbookRender, and so on. The SheetRender class represents a worksheet for rendering images and has an overloaded toImage method that can convert a worksheet to image files directly with any attributes or options set.

Result

After executing the above code, the worksheet named Sheet1 is converted into an image file SheetImage.jpg.

The output JPG

todo:image_alt_text

Using Aspose.Cells to Convert Worksheet to Image File by Page

This example shows how to use Aspose.Cells to convert a worksheet from a template workbook that has several pages into one image file per page.

Result

After executing the above code, the worksheet named Sheet1 is converted into two image files (one per page): Sheet 1 Page 1.Tiff and Sheet 1 Page 2.Tiff.

Generated image file (Sheet 1 Page 1.Tiff)

todo:image_alt_text

Generated image file (Sheet 1 Page 2.Tiff)

todo:image_alt_text

  • Converting Worksheet to Different Image Formats
  • Export Worksheet or Chart into Image with Desired Width and Height