poi excel 相关

一、poi excel    分组(group)

sheet.groupRow(1, 3);

ungroupRow(xxx,xxx); 

 Workbook wb = new HSSFWorkbook();
    Sheet sheet1 = wb.createSheet("new sheet");
    sheet1.groupRow( 5, 14 );
    sheet1.groupColumn( (short)4, (short)7 );

    //To collapse (or expand) an outline use the following calls:
    //大致翻译就是:用如下的调用折叠或展开一个边框
    sheet1.setRowGroupCollapsed( 7, true );
    sheet1.setColumnGroupCollapsed( (short)4, true );

猜你喜欢

转载自terryjs.iteye.com/blog/2199888