Render Worksheet to Graphic Context
Contents
[
Hide
]
Aspose.Cells can now render worksheet to graphic context. Graphic context can be anything like image file, screen or printer etc. Please us the following method to render worksheet to graphic context.
- SheetRender.toImage(int pageIndex, Graphics2D graphic)
Render Worksheet to Graphic Context
The following code illustrates how to use Aspose.Cells to render worksheet to graphic context. Once you will execute a code, it will print the entire worksheet and fill the leftover empty space with blue color in graphics context and save the image as test.png file. You can use any source excel file to try this code. Please also read the comments inside the code for better understanding.