首先,poi老的版本是和新版本是不兼容的,现在poi依赖都到<version>4.1.1</version>了,搜到的博客大部分是前几年的,好多方法基本上都用不了。----》大家注意一下

1.我实现的功能:上图片

月度任务目标,默认有8行。数据少于8行,剩余的行留在哪里。大于8行,for循环递增添加。

(1)大于八行

(2)小于八行

2.前置知识,懂了看代码会舒服很多

1)创建workbook工作薄;

2)创建一个工作表sheet;

3)创建一个行对象row(下标起始值为0);

4)创建一个单元格对象cell(下标起始值为0);

5)给单元格设置内容;

6)设置单元格样式,设置字体和字体大小;

3.上代码

(1)我使用的依赖

 <dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>4.1.1</version></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId><version>4.1.2</version></dependency>

(2)后端代码

 @GetMapping("/export")public ByteArrayOutputStream exportExcle(String userid, Integer bookId, String timeStart, String timeEnd,HttpServletResponse response, Integer isNotMe) throws Exception {response.setCharacterEncoding("UTF-8");//编码格式为UTF-8response.setContentType("application/vnd.ms-excel;charset=UTF-8");List<PerformanceTask> exportTaskList = new ArrayList<>();if (timeStart != null) {//查询的情况exportTaskList = performanceTaskBookService.exportSelectTaskList(timeStart, timeEnd, bookId, userid, isNotMe);} else {//不查询的情况exportTaskList = performanceTaskBookService.exportNoSelectTaskList(userid, bookId, isNotMe);}HSSFWorkbook wb = new HSSFWorkbook();if (exportTaskList.size() > 0) {PerformanceTaskBook performanceTaskBook = performanceTaskBookMapper.selectById(exportTaskList.get(0).getPerformanceTaskBookId());HSSFSheet sheet = wb.createSheet("月绩核表");//sheet.setColumnWidth(0, 10);//  sheet.setDefaultRowHeight();sheet.setDefaultRowHeightInPoints(100);//sheet.setColumnWidth(0, 3766);//表头字体Font headerFont = wb.createFont();headerFont.setFontName("微软雅黑");headerFont.setFontHeightInPoints((short) 18);headerFont.setBold(true);            //字体加粗//正文字体Font contextFont = wb.createFont();contextFont.setFontHeightInPoints((short) 12);//表头样式,左右上下居中CellStyle headerStyle = wb.createCellStyle();headerStyle.setFont(headerFont);headerStyle.setAlignment(HorizontalAlignment.CENTER);// 左右居中headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中headerStyle.setLocked(true);headerStyle.setWrapText(false);// 自动换行//单元格样式,左右上下居中 边框========第一行CellStyle commonStyle = wb.createCellStyle();commonStyle.setFont(contextFont);commonStyle.setAlignment(HorizontalAlignment.CENTER);// 左右居中commonStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中// commonStyle.setLocked(true);commonStyle.setWrapText(true);// 自动换行commonStyle.setFillForegroundColor(IndexedColors.CORNFLOWER_BLUE.getIndex());commonStyle.setBorderBottom(BorderStyle.THIN);//下边框commonStyle.setBorderLeft(BorderStyle.THIN);//左边框commonStyle.setBorderTop(BorderStyle.THIN);//上边框commonStyle.setBorderRight(BorderStyle.THIN);//右边框//******单元格第二行start********HSSFCellStyle commonStyle2 = wb.createCellStyle();commonStyle2.setFont(contextFont);commonStyle2.setAlignment(HorizontalAlignment.CENTER);// 左右居中commonStyle2.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中commonStyle2.setFillForegroundColor(IndexedColors.SEA_GREEN.index);//设置背景色commonStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);commonStyle2.setLocked(true);commonStyle2.setWrapText(true);// 自动换行commonStyle2.setBorderBottom(BorderStyle.THIN);//下边框commonStyle2.setBorderLeft(BorderStyle.THIN);//左边框commonStyle2.setBorderTop(BorderStyle.THIN);//上边框commonStyle2.setBorderRight(BorderStyle.THIN);//右边框//******单元格第二行end*********//******单元格第三行start*********HSSFCellStyle commonStyle31 = wb.createCellStyle();commonStyle31.setFont(contextFont);commonStyle31.setAlignment(HorizontalAlignment.CENTER);// 左右居中commonStyle31.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中commonStyle31.setLocked(true);commonStyle31.setWrapText(true);// 自动换行commonStyle31.setBorderBottom(BorderStyle.THIN);//下边框commonStyle31.setBorderLeft(BorderStyle.THIN);//左边框commonStyle31.setBorderTop(BorderStyle.THIN);//上边框commonStyle31.setBorderRight(BorderStyle.THIN);//右边框HSSFFont font = wb.createFont();font.setFontName("黑体");font.setFontHeightInPoints((short) 12);//设置字体大小font.setBold(true);font.setColor(Font.COLOR_NORMAL);//字体颜色commonStyle31.setFont(font);//选择需要用到的字体格式//******单元格第三行end*********//******单元格倒数第三行start*******HSSFCellStyle commonStylef3 = wb.createCellStyle();commonStylef3.setFont(contextFont);commonStylef3.setAlignment(HorizontalAlignment.CENTER);// 左右居中commonStylef3.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中commonStylef3.setFillForegroundColor(IndexedColors.PALE_BLUE.index);//设置背景色commonStylef3.setFillPattern(FillPatternType.SOLID_FOREGROUND);HSSFFont font4 = wb.createFont();font4.setFontName("黑体");font4.setFontHeightInPoints((short) 12);//设置字体大小font4.setBold(true);font4.setColor(Font.COLOR_NORMAL);//字体颜色commonStylef3.setFont(font4);//选择需要用到的字体格式commonStylef3.setLocked(true);commonStylef3.setWrapText(true);// 自动换行commonStylef3.setBorderBottom(BorderStyle.THIN);//下边框commonStylef3.setBorderLeft(BorderStyle.THIN);//左边框commonStylef3.setBorderTop(BorderStyle.THIN);//上边框commonStylef3.setBorderRight(BorderStyle.THIN);//右边框//******单元格倒数第三行end*********//******单元格倒数第2行start********HSSFCellStyle commonStylef2 = wb.createCellStyle();commonStylef2.setFont(contextFont);commonStylef2.setAlignment(HorizontalAlignment.CENTER);// 左右居中commonStylef2.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中commonStylef2.setLocked(true);commonStylef2.setWrapText(true);// 自动换行HSSFFont font2 = wb.createFont();font2.setFontName("黑体");font2.setFontHeightInPoints((short) 12);//设置字体大小font2.setBold(true);font2.setColor(Font.COLOR_NORMAL);//字体颜色commonStylef2.setFont(font2);//选择需要用到的字体格式commonStylef2.setBorderBottom(BorderStyle.THIN);//下边框commonStylef2.setBorderLeft(BorderStyle.THIN);//左边框commonStylef2.setBorderTop(BorderStyle.THIN);//上边框commonStylef2.setBorderRight(BorderStyle.THIN);//右边框//******单元格倒数第2行end*********//******加粗字体start*********HSSFCellStyle cu2 = wb.createCellStyle();cu2.setFont(contextFont);cu2.setAlignment(HorizontalAlignment.CENTER);// 左右居中cu2.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中cu2.setLocked(true);cu2.setWrapText(true);// 自动换行HSSFFont font3 = wb.createFont();font3.setFontName("黑体");font3.setFontHeightInPoints((short) 12);//设置字体大小font3.setBold(true);font3.setColor(Font.COLOR_NORMAL);//字体颜色cu2.setFont(font3);//选择需要用到的字体格式cu2.setBorderBottom(BorderStyle.THIN);//下边框cu2.setBorderLeft(BorderStyle.THIN);//左边框cu2.setBorderTop(BorderStyle.THIN);//上边框cu2.setBorderRight(BorderStyle.THIN);//右边框//******加粗字体end*********//单元格样式,竖向 边框CellStyle verticalStyle = wb.createCellStyle();verticalStyle.setFont(contextFont);verticalStyle.setRotation((short) 255);//竖向verticalStyle.setLocked(true);verticalStyle.setWrapText(false);// 自动换行verticalStyle.setBorderBottom(BorderStyle.THIN);//下边框verticalStyle.setBorderLeft(BorderStyle.THIN);//左边框verticalStyle.setBorderTop(BorderStyle.MEDIUM_DASHED);//上边框verticalStyle.setBorderRight(BorderStyle.THIN);//右边框/*******************==========插入图片start=============***********************/FileOutputStream fileOut = null;RenderedImage bufferImg = null;//图片//try {// 先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArrayByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();//将图片读到BufferedImageString destUrl = "https://pr-mdf-erp.oss-cn-hangzhou.aliyuncs.com/logo/excelLogo.png";HttpURLConnection httpUrl = (HttpURLConnection) new URL(destUrl).openConnection();httpUrl.connect();//File file = FileUtil.inputStreamToFile(httpUrl.getInputStream(),"url.png");// System.out.println("111====>>>>"+file.getPath());bufferImg = ImageIO.read(httpUrl.getInputStream());httpUrl.disconnect();// bufferImg = ImageIO.read(outputStream);ImageIO.write(bufferImg, "png", byteArrayOut);// 将图片写入流中// 利用HSSFPatriarch将图片写入EXCELHSSFPatriarch patriarch = sheet.createDrawingPatriarch();//列  行//图片一导出到单元格B5中HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 1, (short) 0, 0, (short) 2, 1);// 插入图片patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_PNG));/*******************==========插入图片end=============***********************/int rowNum = 0;//设置列宽for (int i = 0; i < 10; i++) {if (i == 0 || i == 1) {sheet.setColumnWidth(i, 3000);} else if (i == 2) {sheet.setColumnWidth(i, 2600);} else if (i == 3) {//绩效任务内容sheet.setColumnWidth(i, 23000);} else if (i == 4) {//计划时间sheet.setColumnWidth(i, 6600);} else if (i == 5) {//完成情况sheet.setColumnWidth(i, 3600);} else if (i == 6) {//自评得分sheet.setColumnWidth(i, 3100);} else if (i == 7) {//实际完成情况简述sheet.setColumnWidth(i, 5600);} else if (i == 8) {//复评得分sheet.setColumnWidth(i, 3100);} else {sheet.setColumnWidth(i, 2000);}}//第一行Row r0 = sheet.createRow(rowNum++);r0.setHeight((short) 800);Cell c00 = r0.createCell(2);c00.setCellValue(performanceTaskBook.getPerformanceTaskBookName() +time.substring(0, 4) + "年" + time.substring(5, 7) + "月绩效考核表");c00.setCellStyle(headerStyle);//合并单元格sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 1));sheet.addMergedRegion(new CellRangeAddress(0, 0, 2, 9));// 第二行Row r1 = sheet.createRow(rowNum++);r1.setHeight((short) 500);String[] row_first = {"职能中心", "", "", "岗位名称", "", " 6", "7", "", "", "10"};for (int i = 0; i < row_first.length; i++) {Cell tempCell = r1.createCell(i);// sheet.autoSizeColumn(2, true);if (i == 0) {//1tempCell.setCellValue(row_first[i]);tempCell.setCellStyle(commonStyle2);} else if (i == 1) {//23tempCell.setCellStyle(commonStyle2);tempCell.setCellValue(departmentName);} else if (i == 3) {tempCell.setCellValue(row_first[i]);tempCell.setCellStyle(commonStyle2);} else if (i == 4) {//456tempCell.setCellValue((String) kvUser.get("position"));tempCell.setCellStyle(commonStyle2);} else if (i == 6) {//7tempCell.setCellValue("姓名");tempCell.setCellStyle(commonStyle2);} else if (i == 7) {//8 9 10tempCell.setCellValue(performanceTask.getOperator());tempCell.setCellStyle(commonStyle2);}}//合并sheet.addMergedRegion(new CellRangeAddress(1, 1, 1, 2));sheet.addMergedRegion(new CellRangeAddress(1, 1, 4, 5));sheet.addMergedRegion(new CellRangeAddress(1, 1, 7, 9));//第三行Row r2 = sheet.createRow(rowNum++);r2.setHeight((short) 700);String[] row_second = {"区分", "指标类别", "", "绩效任务内容", "计划时间", "完成情况", "自评得分", "实际完成情况简述", "复评得分", "权重"};for (int j = 0; j < row_second.length; j++) {Cell tempCell1 = r2.createCell(j);tempCell1.setCellValue(row_second[j]);tempCell1.setCellStyle(commonStyle31);}// 合并sheet.addMergedRegion(new CellRangeAddress(2, 2, 1, 2));int length = 0;if (exportTaskList.size() > 8) {length = exportTaskList.size() - 8;}//循环每一行int targetNum = 1;for (int i = 0; i < 8 + length; i++) {PerformanceTask p = null;if (i < exportTaskList.size()) {p = exportTaskList.get(i);}Row tempRow = sheet.createRow(rowNum++);tempRow.setHeight((short) 500);// 循环单元格填入数据for (int j = 0; j < 10; j++) {String tempValue = null;Cell tempCell1 = tempRow.createCell(j);tempCell1.setCellStyle(commonStyle);if (j == 0) {if (targetNum == 1) {tempValue = "B工作绩效考核指标(40%)";tempCell1.setCellStyle(cu2);} else {tempValue = null;}}if (j == 1) {if (targetNum == 1) {tempValue = "月度任务指标";tempCell1.setCellStyle(cu2);} else {tempValue = null;}}if (j == 2) {// 目标tempValue = "目标" + targetNum;} else if (j == 3) {if (p != null) {// 任务描述--》绩效任务内容tempValue = p.getTaskDescription();} else {tempValue = null;}} else if (j == 4) {if (p != null) {// 计划时间tempValue = p.getTaskCycleStart() + "~" + p.getTaskCycleEnd();} else {tempValue = null;}} else if (j == 5) {if (p != null) {// 完成情况if (p.getTaskState() == 0) {tempValue = "未读";} else if (p.getTaskState() == 1) {tempValue = "执行中";} else if (p.getTaskState() == 2) {tempValue = "待审核";} else if (p.getTaskState() == 3) {if (p.getCompletedTime() != null) {//仅仅为了过滤掉历史不正确数据。正式使用的时候p.getCompletedTime()不会为空的SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");Date sd1 = df.parse(p.getTaskCycleEnd());//要求完成时间Date sd2 = df.parse(p.getCompletedTime());//最后完成时间if (sd2.before(sd1)) {tempValue = "已完成";} else {tempValue = "逾期完成时间" + p.getCompletedTime();}} else {tempValue = "已完成";}}} else {tempValue = null;}} else if (j == 6) {// 自我评分tempValue = null;} else if (j == 7) {// 实际完成情况简述tempValue = null;} else if (j == 8) {// 复核评分tempValue = null;} else if (j == 9) {// 权重tempValue = null;}tempCell1.setCellValue(tempValue);}targetNum++;}int size = 8 + length;// 合并sheet.addMergedRegion(new CellRangeAddress(3, size + 3, 0, 0));sheet.addMergedRegion(new CellRangeAddress(3, size + 2, 1, 1));//倒数第七行Row rf7 = sheet.createRow(rowNum++);rf7.setHeight((short) 700);String[] row_rf7 = {"", "考评小计(依据年度经营计划及组织发展营运管理需求制定)", "", "", "", "", "", "", "", ""};for (int j = 0; j < 10; j++) {Cell tempCellf7 = rf7.createCell(j);if (j == 1) {tempCellf7.setCellValue(row_rf7[j]);tempCellf7.setCellStyle(cu2);} else {tempCellf7.setCellValue(row_rf7[j]);tempCellf7.setCellStyle(commonStyle);}}sheet.addMergedRegion(new CellRangeAddress(size + 3,size + 3, 1, 3));//循环每一行int target = 1;for (int i = 0; i < 2; i++) {Row tempRow = sheet.createRow(rowNum++);tempRow.setHeight((short) 500);// 循环单元格填入数据for (int j = 0; j < 10; j++) {String tempValue = null;Cell tempCell6 = tempRow.createCell(j);tempCell6.setCellStyle(commonStyle);if (j == 0) {if (target == 1) {tempValue = "C主管裁量(加减分项)";tempCell6.setCellStyle(cu2);} else {tempValue = null;}} else if (j == 1) {// 目标tempValue = "目标" + "(" + target + ")";} else {tempValue = null;}tempCell6.setCellValue(tempValue);}target++;}//倒数第4行Row rf4 = sheet.createRow(rowNum++);rf4.setHeight((short) 700);// String[] row_rf4 = {"", "考评小计(此项由直属主管在员工绩效评核时综合评定,分值+-5分,评核时必须备注客观评核理由)", "3", "4", "5", "6", "7", "8", "9", "10"};for (int j = 0; j < 10; j++) {String tempValue = null;Cell tempCellrf4 = rf4.createCell(j);if (j == 1) {tempCellrf4.setCellValue("考评小计(此项由直属主管在员工绩效评核时综合评定,分值+-5分,评核时必须备注客观评核理由)");tempCellrf4.setCellStyle(cu2);} else {tempCellrf4.setCellValue(tempValue);tempCellrf4.setCellStyle(commonStyle);}//tempCell.setCellStyle(commonWrapStyle);}// 合并sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 6,0, 0));sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 1, 2));sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 1, 2));sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 1, 3));//倒数第3行Row rf3 = sheet.createRow(rowNum++);rf3.setHeight((short) 700);String[] row_rf3 = {"岗位绩效考评总分=B+C=", "2", "3", "4", "5", "6", "7", "8", "9", "10"};for (int j = 0; j < 10; j++) {String tempValue = null;Cell tempCellrf3 = rf3.createCell(j);tempCellrf3.setCellStyle(commonStylef3);if (j == 0) {tempCellrf3.setCellValue(row_rf3[j]);tempCellrf3.setCellStyle(commonStylef3);} else {tempCellrf3.setCellValue(tempValue);}}// 合并sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7,0, 3));//倒数第2行Row rf2 = sheet.createRow(rowNum++);rf2.setHeight((short) 700);String[] row_rf2 = {"被评核人签字/日期", "人资行政中心负责人签字/日期", "总办运营签字/日期", "审批人签字/日期", "5", "6", "7", "8", "9", "10"};for (int j = 0; j < 10; j++) {String tempValue = null;Cell tempCellrf2 = rf2.createCell(j);if (j == 0) {tempCellrf2.setCellValue("被评核人签字/日期");} else if (j == 3) {tempCellrf2.setCellValue("人资行政中心负责人签字/日期");} else if (j == 4) {tempCellrf2.setCellValue("总办运营签字/日期");} else if (j == 7) {tempCellrf2.setCellValue("审批人签字/日期");} else {tempCellrf2.setCellValue(tempValue);}tempCellrf2.setCellStyle(commonStylef2);}// 合并sheet.addMergedRegion(new CellRangeAddress(size + 8, size + 8,0, 2));
//            sheet.addMergedRegion(new CellRangeAddress(exportTaskList.size() + 8, exportTaskList.size() + 8,
//                    3, 4));sheet.addMergedRegion(new CellRangeAddress(size + 8, size + 8,4, 6));sheet.addMergedRegion(new CellRangeAddress(size + 8, size + 8,7, 9));//倒数第1行Row rf1 = sheet.createRow(rowNum++);rf1.setHeight((short) 700);for (int j = 0; j < 10; j++) {String tempValue = null;Cell tempCellrf1 = rf1.createCell(j);tempCellrf1.setCellValue(tempValue);tempCellrf1.setCellStyle(commonStyle);}sheet.addMergedRegion(new CellRangeAddress(size + 9, size + 9,0, 2));sheet.addMergedRegion(new CellRangeAddress(size + 9, size + 9,3, 6));sheet.addMergedRegion(new CellRangeAddress(size + 9, size + 9,7, 9));}OutputStream outputStream = response.getOutputStream();wb.write(outputStream);return null;}

(3)设置HttpServletResponse的作用

-->response对象的功能分为四种:

设置响应头信息:addHeader("reFresh", "5;URL=xxx")

发送状态码:sendError(404)

设置响应正文:getWriter().print("xxx")

重定向:sendRedirect("path")
-->response.setContentType("text/html;charset=utf-8"):设置响应类型为html,编码为utf-8,处理相应页面文本显示的乱码

response.setCharacterEncoding("utf-8"):如果响应类型为文本,那么就需要设置文本的编码类型,然后浏览器使用这个编码来解读文本,注意:如果没有设置contentType,那么浏览器会认为contentType为text/html,如果没设置编码,那么默认为IOS-8859-1编码,所以以上两点在使用response返回结果之前必须设置。
参考博客:https://blog.csdn.net/weixin_41547486/article/details/81266712?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-4.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-4.control

(4)引入logo,坐标

HSSFClientAnchor(int dx1, int dy1, int dx2, int dy2, short col1, int row1, short col2, int row2)
dx1 dy1 起始单元格中的x,y坐标.

dx2 dy2 结束单元格中的x,y坐标

col1,row1 指定起始的单元格,下标从0开始

col2,row2 指定结束的单元格 ,下标从0开始

4.总结:

excle设置样式,其实是以单元格为单位的。时间仓促,最近超忙,代码有冗余(实属抱歉)。总结以上内容,欢迎大家一起讨论。。。。

poi导出复杂的excle,简单易懂一看既会相关推荐

  1. POI导出Word插入复选框

    POI功能比较强大,但是有些不常用功能比如插入特殊符号,不知道API怎么调用 Word里要插入复选框,首先想到的是POI有没有提供现成的API,搜了一番,貌似都说不直接支持 http://stacko ...

  2. java中使用poi导出ppt(图片和表格)

    java使用POI导出PPT(超简单方法,包含图片和表格) 在做项目中遇到一个需求,将职员的信息导出成一个形式固定的ppt文档,poi有许多方法可以实现,因为我是一名Java小白,于是便想用最简单的方 ...

  3. 简单封装POI导出excel

    简单封装POI导出excel Apache POI是一套根据Office Open XML标准(OOXML)和Microsoft OLE 2复合文档格式(OLE2)来处理各种文件格式的Java API ...

  4. POI实现大数据EXCLE导入导出,解决内存溢出问题

    POI实现大数据EXCLE导入导出,解决内存溢出问题 参考文章: (1)POI实现大数据EXCLE导入导出,解决内存溢出问题 (2)https://www.cnblogs.com/huangjian2 ...

  5. Springboot整合Poi导出excel(简单版)

    一. 问题引入 博客专栏: Springboot整合Poi导出excel(简单版) Springboot整合Poi导出excel(注解版) 总所周知Springboot是一个功能强大的微服务框架,集成 ...

  6. POI导出Excel工具类(简单看完就会)

    (一)POI介绍 Apache POI是Apache软件基金会的开源项目,POI提供API给Java程序对Microsoft Office格式档案读和写的功能. .NET的开发人员则可以利用NPOI ...

  7. 使用Dhtml和poi导出excle表格出现Error Type:LoadXMl Incorrect Json错误

    正在做的一个项目:用的是Struts1  hibernate spring 前台是Dhtml.这些技术都不熟,所以出现了很多问题. 想要实现的功能:加一个POI导出excel表格功能 出现的问题:如上 ...

  8. POI导出Excel时下拉列表值超过255的问题(String literals in formulas can‘t be bigger than 255 characters ASCII)

    一.简单的描述问题:(记录问题) 首先说一下我们导出的这个Excel表,我们是通过POI来生成一个Excel表,然后在Excel表中添加了下拉列表,然后将数据库中取出的数据放到下拉列表中,这样每次导出 ...

  9. java POI导出多张图片到表格(占位符方式)

    最近做的项目,需要将一些信息导出到word中.在网上找了好多解决方案,现在将这几天的总结分享一下. 目前来看,java导出word大致有6种解决方案: 1:Jacob是Java-COM Bridge的 ...

最新文章

  1. 犹豫了许久,还是写个年总结记录一下吧
  2. C++静态成员函数小结
  3. linux中使用ssh或scp时如何跳过RSA key fingerprint输入yes/no
  4. 无线鼠标接收器对码软件_接收器太小容易丢 这几招记好就不怕
  5. 敏捷软件开发宣言–Manifesto for Agile Software Development
  6. iframe异步加载技术及性能
  7. C语言课后习题(57)
  8. cad加载dll_关于CAD三维建模的35个问题
  9. epplus word html,EPPlus简介
  10. We7开通问答系统:进一步开发社区的力量
  11. 斯特灵公式求阶乘c语言,斯特林公式求阶乘
  12. H264/H265编码视频流媒体播放器EasyWasmPlayer.js控制台循环报错Unsupported排查
  13. 怎么通过服务器性能计算tpmc,如何对服务器性能计算的公式参考(tpmc-tpcc)...pdf
  14. awesomium -- 出色的Web浏览插件
  15. 用python的Turtle库画一个笑脸
  16. redis中 Could not get a resource from the pool 异常解决
  17. PHP导出Excel方法大全
  18. 前端技术周刊 2018-12-24:移动无限加载
  19. 简单理解云桌面的模板,桌面池和虚拟机的概念
  20. 身份证OCR识别接口的优点

热门文章

  1. 限制7种范围IP的ASP自定义函数(改进)
  2. Python3 小技巧三 每十个数取一次值
  3. ArcGIS Runtime Esri新的离线地图数据格式——移动地图包(转载自Esri中国)
  4. 英文SEO站群操作模式介绍
  5. CodeForces - 31D Chocolate【几何】【连通块】
  6. mysql slap_组合方法和SLAP
  7. 联想集团是一家在信息产业内多元化发展的大型企业集团
  8. 从0到一开发微信小程序(1)——申请账号并安装开发环境
  9. 数字信号处理_第1个编程实例
  10. Linux下搜狗拼音输入法无法输出中文以及显示界面异常