POI学习笔记(三)
14. 自定义颜色
????? HSSF:
?
?
? 备注:只有在打印预览的时候页脚才显示出来。
?20. 选中一个Sheet
public void shiftRow() throws Exception{Workbook wb = new HSSFWorkbook(); Sheet sheet = wb.createSheet("row sheet"); for(int i=0;i<20;i++){ Row row=sheet.createRow(i); Cell cell=row.createCell(0); cell.setCellValue(""+i); } // Shift rows 6 - 11 on the spreadsheet to the top (rows 0 - 5) //把第6-11行向上移动5行 sheet.shiftRows(5, 10,-5); FileOutputStream fileOut = new FileOutputStream("workbook.xls"); wb.write(fileOut); fileOut.close();}?POI学习笔记四将会介绍poi更高级的一些知识点。