Blog: Tech Talk

agsdix-fas fa-home

Blog: Home

agsdix-fas fa-pen-fancy

Blog: CEO's Corner

agsdix-fas fa-code

Blog: Tech Talk

Blog: Product Releases

agsdix-fas fa-chalkboard-teacher

Blog: Viewing

Blog: Conversion

arrow left circle icon Blog: Tech Talk

Processing and Saving All Worksheets in an Excel Document

by | Apr 24, 2012

Snowbound Software’s RasterMaster™ for the Java™ Platform includes the ability to convert Excel documents to other file formats such as PDF. During the conversion, you are able to save all of the worksheets or pages in an Excel workbook by using Snowbound Software’s multi-page convert sample to convert each worksheet as a separate page. The following code sample demonstrates how to convert each worksheet as a separate page:

pages = Simage.IMGLOW_get_pages(“sample.xls”);

for (x = 0; x < pages ; x++)
{
Simage.IMG_decompress_bitmap(“sample.xls”,x);
Simage.IMG_save_bitmap(“out.pdf”,Snow.Defines.PDF);
}

To get the color to convert accurately in your Excel document, set IMGLOW_set_document_input(200,24,Snow.Defines.EXCEL( or 84)) .
The DPI (dots per inch) is 200. The bits per pixel or color is 24.
Note: Excel files can be very large and may run out of memory when rendering as color.