-
1.
HSSFCell?c;
..
c.setEncoding(HSSFCell.ENCODING_UTF_16);
c.setCellValue("测试测试测试测试测试测试测试测试");
2.
打印设置
import?org.apache.poi.hssf.usermodel.HSSFPrintSetup;
创建打印设置对象
HSSFPrintSetup?hps?=?hs.getPrintSetup();
设置A4纸
hps.setPaperSize((short)9);?
将页面设置为横向打印模式
hps.setLandscape(true);?
设置打印页面为水平居中
sheet.setHorizontallyCenter(true);?
设置打印页面为垂直居中
sheet.setVerticallyCenter(true);
