阅读背景:

nopi使用 设置列样式 宽高 设置分页符

来源:互联网 
            HSSFWorkbook book = new HSSFWorkbook();
            ISheet sheet = book.CreateSheet("test_01");
            sheet.FitToPage = false;//设置不过滤分页符号
//设置第一列宽度
            sheet.SetColumnWidth(0, 3600);
          //设置第一列默认样式GetDefaultCellStyleCell()为自己写的扩展方法
            sheet.SetDefaultColumnStyle(0, book.GetDefaultCellStyleCell());
          
            IRow row = null;
创建第0行
       row = sheet.CreateRow(i); i++;
创建行第0列
                ICell ICell = row.CreateCell(0);
                ICell = book.GetCellTitleStyleCell(ICell, "      宜花网(Easyflower)发货单       ");
                row = sheet.CreateRow(i); i++;
                //标题信息加重字体
                row.CreateCell(0);
                row.Cells[0] = book.GetCellImportantStyleCell(row.Cells[0], "订货单号:");
                row.CreateCell(1).SetCellValue(item.orderInfo.oId);
                row.CreateCell(2);
                row.Cells[2] = book.GetCellImportantStyleCell(row.Cells[2], "花店编号:");
                row.CreateCell(3).SetCellValue("72710");
                row = sheet.CreateRow(i); i++;    
sheet.SetRowBreak(i);//插入分页符号
            HSSFWorkbook book = new HSSFWor



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: