I m exporting my report in excel , in that I m setting worksheet name ,which is in chinese language,
What r the changes reuired to have worksheet name in chinese ?
worksheet = workbook.createSheet(cName);
This is my line of code, in debugging I got correct name (in chinese language in variable cName);
I m using poi 2.0 jar
Errors I m getting are:
Excel found unreadable contains.Do u want to recover contains of workbook?If trust the source of this workbook click Yes.
When I clicked Yes.I got pop up as "Renamed invalid sheet name".
So what is going wrong? Can anyone help me ?
I got the solution ,
It may be useful for you too.
wb.setSheetName(wb.getNumberOfSheets()-1, cName, HSSFCell.ENCODING_UTF_16);
In this way ,you are seeting encoding for worksheet name.