I need to convert excel files to TIFF format.
1. How can i set the output to be 8bit or 24bit tiff file?
2. How can I set the color scheme (black/white, rgb, etc.)?
3. How can i set the Last page offset point to NULL?
Please clarify.
Thanks
Tashani
I need to convert excel files to TIFF format.
Hi Tashani,
Thanks for your posting and using Aspose.Cells.
We are afraid, you cannot set tiff to 8 or 24 bit in Java version but in .NET version you can set the Pixel format. However, if you need this feature, we will log a New Feature request in our database to support it in Aspose.Cells Java version.
You can control as Black/White, RGB color scheme using Tiff compression. You can also control which area to be output in tiff by setting the print area of worksheet.
Please see the following sample code and its comments. I have attached the source Excel file used in this code and output tiff image for your reference.
Java
String filePath = “F:\Shak-Data-RW\Downloads\source.xlsx”;
//Create workbook object
Workbook workbook = new Workbook(filePath);
//Access first worksheet
Worksheet worksheet = workbook.getWorksheets().get(0);
//Set the print area as you want, it is not necessary
//This way you can control what portion of worksheet you want to print
worksheet.getPageSetup().setPrintArea(“A5:E10”);
//Control your image or print options
ImageOrPrintOptions opts = new ImageOrPrintOptions();
Hi,
Hi Tashani,