首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

POI学习札记(三)

2012-11-10 
POI学习笔记(三)14. 自定义颜色????? HSSF:??? 备注:只有在打印预览的时候页脚才显示出来。?20. 选中一个Sh

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更高级的一些知识点。

热点排行