网上删除行代码:
/** * Remove a row by its index * @param sheet a Excel sheet * @param rowIndex a 0 based index of removing row */ public static void removeRow(Sheet sheet, int rowIndex) { int lastRowNum=sheet.getLastRowNum(); if(rowIndex>=0&&rowIndex<lastRowNum){ sheet.shiftRows(rowIndex+1,lastRowNum, -1); } if(rowIndex==lastRowNum){ Row removingRow=sheet.getRow(rowIndex); if(removingRow!=null){ sheet.removeRow(removingRow); } } }
在要删除的行下面其他行存在批注内容是,打开excel会报错,如图:
删除第2行,打开excel时报错:
修复后:
修复后>=2行里的批注全部删除,此bug在poi-3.11存在,在poi-3.12-bea1存在,目前尚未修复。
官网关于此bug的记录:https://bz.apache.org/bugzilla/show_bug.cgi?id=56017
只能等poi-3.12下一版本了。
全文完。
相关推荐
java操作office文档工具类,apache出品
Apache POI 是用Java编写的免费开源的跨平台的 Java API,Apache POI提供API给Java程式对Microsoft Office格式档案读和写的功能。3.11 支持office 2007等。
Apache POI 3011 word文档转HTML,内含jar包(ooxml-schemas-1.1.jar、poi-3.11.jar、poi-examples-3.11.jar、poi-ooxml-3.11.jar、poi-scratchpad-3.11.jar、xdocreport-1.0.5.jar、xmlbeans-2.6.0.jar)
POI_添加批注
poi-3.11-20141221.jar poi-examples-3.11-20141221.jar poi-excelant-3.11-20141221.jar poi-ooxml-3.11-20141221.jar poi-ooxml-schemas-3.11-20141221.jar poi-scratchpad-3.11-20141221.jar
poi-3.17 poi-3.16,现在低版本的3.14什么的用作excel导出已经很多不支持的了。正好搜集了两个新版本的poi jar包,分享给大家
POI的一些jar包,包含了3.8、3.10、3.11三个版本,都是可以用的
java poi导入导出所需的jar包(3.11版本),直接加到项目中即可使用
poi-examples-3.11-20141221.jar 插件2积分就 可以下载
Apache官网2014年12月21日发布的poi资源包
poi-3.11-20141221.jar, poi-examples-3.11-20141221.jar,poi-excelant-3.11-20141221.jar,poi-ooxml-3.11-20141221.jar,poi-ooxml-schemas-3.11-20141221.jar,poi-scratchpad-3.11-20141221.jar,xmlbeans-...
POI API Documentation 3.11版本
poi jar包 测试使用无bug poi jar包 测试使用无bug
该poi提供了对Excel表格的读取,是这的学习的一个文件。
java中excel源码jar包poi-3.11。实测有效。实现java中excel表格的导入导出
poi-ooxml-***.jar中文文档.zip,java,poi-ooxml-***.jar,org.apache.poi,poi-ooxml,***,org.apache.poi.ooxml,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,apache,poi,ooxml,中文API文档,手册,开发...
poi-***.jar中文文档.zip,java,poi-***.jar,org.apache.poi,poi,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,apache,中文API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压 【poi-***...
poi3.16jar包和poi最新版4.0.1jar包
poi-***.jar中文-英文对照文档.zip,java,poi-***.jar,org.apache.poi,poi,***,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,apache,中文-英文对照API文档,手册,开发手册,使用手册,参考手册 # 使用方法...
poi-scratchpad-3.11-20141221.jar 只需要2积分就可以下载