JXL (Java Excel API) is a open source Java API which allows Java developers to read Excel spreadsheets and to generate Excel spreadsheets dynamically. In addition, it contains a mechanism which allows java applications to read in a spreadsheet, modify some cells and write out the new spreadsheet.
You can learn how to use it by the following link.
This is the way how to overcome that issue.
Usually you can create the Workbook file as below.
Workbook workbook = Workbook.getWorkbook( new File(<path_to_excel_file>) );
WorkbookSettings ws = new WorkbookSettings();
ws.setEncoding("CP1250");
Workbook workbook = Workbook.getWorkbook( new File(<path_to_excel_file>), ws );
Here CP1250 is a standard character encoding format. Like that you can specify what is the Character set you are going to use (ex: utf8, cp1250, etc...). So set the character set at the very beginning. Then you can read and write the characters which are defined under that character encoding system.
Cheers...!!
No comments:
Post a Comment