2013年11月14日星期四

POI Export Excel, worksheet name garbled

In export Excel spreadsheet using POI , the worksheet name garbled ,
Add sentence code : workBook.setSheetName (sheetCount, sheetName, HSSFWorkbook.ENCODING_UTF_16); error. . . .
setSheetName () only two parameters, and "HSSFWorkbook" no "ENCODING_UTF_16" this method.

how to solve , solution . . . .


------ Solution -------------------------- ------------------
String fileName = URLEncoder.encode ("Excel Chinese name . excel", "UTF-8"); < br> ------ Solution ----------------------------------------- ---
HSSFCell cell = row.createCell ((short) y);
cell.setCellType (HSSFCell.ENCODING_UTF_16); / / Chinese garbled processing
------ Solution -------------- ------------------------------
do not say thank you * _ *
------ Solution --------------------------------------------
you write up in English
people to see that this is the international standards of Excel .. another trend
------ For reference only ------------- --------------------------
tried, or garbled
------ For reference only ---------------------------------------
  This reply was moderator deleted at 2012-04-24 14:24:57

------ For reference only ---------------------------------- -----
mentioned above is the # 1 floor

# 2 imported cell floor is garbled , and now want to know is exported , Sheet 's Name garbled how to deal with ? ? ? ?
------ For reference only -------------------------------------- -
Oh, thank you ha
------ For reference only ------------------------ ---------------
this possible I tried
workbook.setSheetName ( the first of several sheet, sheet name , HSSFWorkbook.ENCODING_UTF_16);

没有评论:

发表评论