In this program we are going to set the sheet name forcing the encoding.
Compressed Unicode in Excel Using POI3.0
In this program we are going to set the sheet name forcing the encoding.The methods can be used for built in data format:
setSheetName(int sheet, String name):
This method is used to set the sheet name.
setSheetName(int sheet, String name, short encoding):
This method is deprecated. In POI 3.0, now automatically detects unicode and sets the encoding appropriately. Simply use setSheetName(int sheet, String encoding)
setSheetName(int sheet, String name):
This method is used to set the sheet name. This method can throw IllegalArgumentException if the name is greater than 31 chars or contains /\,?,*,[,],etc
setSheetName( int sheet, String name, short encoding):
This method is also deprecated. Now POI3.0 automatically detects Unicode and sets the encoding appropriately. Simply use setSheetName(int sheet, String encoding)
The code of the program is given below:
import java.io.*;
|
The output of the program is given below: