In this program we are going to make a java program through which we can zoon in(-) an excel sheet. By this means you can make an excel sheet smaller than their original size .
The package we need to import is java.io.*,java.util.* ,org.apache.poi.hssf.usermodel.HSSFSheet, org.apache.poi.usermodel.HSSFRow, org.apache.poi.usermodel.HSSFCell and org.apache.poi.hssf.usermodel. HSSFWorkbook.
This method is used to set the zoom ratio of the excel sheet e.g. setZoom(3,4) means zoom the sheet as 75%.
In this example we are creating the sheet and set the
zoom ratio 75%. This means the output of the sheet will be zoomed in 25% of their original size. In other words we can say the size of excel sheet will be
shrunken by 25%.
The code of the program is given below:
The output of the program is given below:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial