In this program we are going to find type of an excel sheet using POI3.0 API Event.
Find Type of Excel Sheet
In this program we are going to find type of an excel sheet using POI3.0 API Event.The methods used in this example:
getSid():
This method is used to give the description copied from class.
public static final short sid:
The sid variable is used for the less than operator as hex .
The public class BOFRecord extends Record class. It is used for the beginning of a set of records that have a particular purpose or subject used in sheets and workbooks
getType():
This method is used to find type of object that is marked. This method returns short type of object.
The different types of: workbook are:
1.TYPE_WORKBOOK,
2. TYPE_VB_MODULE,
3.TYPE_WORKSHEET,
4.TYPE_CHART,
5.TYPE_EXCEL_4_MACRO,
6.TYPE_WORKSPACE_FILE
The code of the program is given below:
import java.io.*;
|
The output of the program is given below:
C:\POI3.0\exmples\execl>javac FindNameOfSheet.java C:\POI3.0\exmples\execl>java FindNameOfSheet example.xls New sheet named: Sheet1 New sheet named: Sheet2 New sheet named: Sheet3 STOP |