Bug 20899 - HSSFCell setCellValue problem
Summary: HSSFCell setCellValue problem
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 1.5.1
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-19 05:12 UTC by tommy
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tommy 2003-06-19 05:12:34 UTC
when the string u is not a enlgish or number sentence,the file data have 
problem.

FileOutputStream  out = new FileOutputStream ("C:/workbook.xls");		
HSSFWorkbook wb = new HSSFWorkbook();
HSSFRow r = null;
HSSFCell c = null;
r = s.createRow((short)0);
c = r.createCell((short)0);	
String u="‘ªŽŽŒÜ˜ZŽµ";
c.setCellValue(u);
c.setCellType( HSSFCell.CELL_TYPE_STRING );
c.setEncoding(HSSFCell.ENCODING_COMPRESSED_UNICODE);
wb.write(out);
Comment 1 Andy Oliver 2003-07-24 16:56:44 UTC
yes, for this you should set the encoding to the UTF_16 (which we need to
correct to be more lear in 3.0)