apache-poi

I can not find for the source code repository for poi-ooxml-schemas

有些话、适合烂在心里 提交于 2020-06-27 11:52:31
问题 Alright, this is a little bit wierd. I've checkout apache-poi version 3.9 source code from http://archive.apache.org/dist/poi/release/src/ But I can not find the source code for poi-xml-schemas. I have been googling but to no avail. Where is the code repository for these project? Is it a separate project from the poi source code or it is from some other project used as a library, but where is the code repository? 回答1: This is covered in the Apache POI FAQ (#14), from which I quote: 14. I can

Apache POI delete row and append row

核能气质少年 提交于 2020-06-27 04:08:21
问题 I am using apache-poi(3.16 and 4.0.0) to generate an excel file. I need to delete the specified line (remove row and move to the last row) and append the data after the last line. When I moved the line, I found that it did not work as expected. These are my codes (rowNum < lastRowNum): shiftRows1 sheet.shiftRows(rowNum, rowNum, sheet.getLastRowNum() - rowNum, true, false); shiftRows2 sheet.shiftRows(rowNum + 1, sheet.getLastRowNum(), -1, true, false); appendRow setRowValue(sheet.getLastRowNum

Apache POI delete row and append row

纵然是瞬间 提交于 2020-06-27 04:08:02
问题 I am using apache-poi(3.16 and 4.0.0) to generate an excel file. I need to delete the specified line (remove row and move to the last row) and append the data after the last line. When I moved the line, I found that it did not work as expected. These are my codes (rowNum < lastRowNum): shiftRows1 sheet.shiftRows(rowNum, rowNum, sheet.getLastRowNum() - rowNum, true, false); shiftRows2 sheet.shiftRows(rowNum + 1, sheet.getLastRowNum(), -1, true, false); appendRow setRowValue(sheet.getLastRowNum

styles.xml breaking password-protected XSSFWorkbook (Apache POI v3.16) save process [SOLVED]

北战南征 提交于 2020-06-17 12:58:48
问题 Currently using Apache POI 3.16 on Java version 1.7.0-251 (Unix) Taking a leaf out of the example explained by @Aniruddh Chandegra (How to create and edit a password protect excel sheet using Apache POI 3.14?) [EDIT - Added the below code to show what I'm doing: creates XSSFWorkbook and extracts data, then encrypts] Note: I'm running the code on - server-side Javascript - using Mozilla Rhino v1.7R3 which provides support for nearly all of ECMAScript Edition 5 plus a few features from Mozilla

styles.xml breaking password-protected XSSFWorkbook (Apache POI v3.16) save process [SOLVED]

微笑、不失礼 提交于 2020-06-17 12:55:26
问题 Currently using Apache POI 3.16 on Java version 1.7.0-251 (Unix) Taking a leaf out of the example explained by @Aniruddh Chandegra (How to create and edit a password protect excel sheet using Apache POI 3.14?) [EDIT - Added the below code to show what I'm doing: creates XSSFWorkbook and extracts data, then encrypts] Note: I'm running the code on - server-side Javascript - using Mozilla Rhino v1.7R3 which provides support for nearly all of ECMAScript Edition 5 plus a few features from Mozilla

Setting filter on headers of an Excel sheet via POI

筅森魡賤 提交于 2020-06-09 08:12:42
问题 I generate a sheet, pretty bog standard headers and columns of data. I want to turn on the "Filter" function for the sheet, so the user can easily sort and filter the data. Can I so this using POI? 回答1: Save the first and last cell from filter area, and execute: sheet.setAutoFilter(new CellRangeAddress(firstCell.getRow(), lastCell.getRow(), firstCell.getCol(), lastCell.getCol())); For example, from the below sheet. >x (x, y) 0123456 0|--hhh--| h = header 1|--+++--| + = values 2|--+++--| - =

Setting filter on headers of an Excel sheet via POI

那年仲夏 提交于 2020-06-09 08:10:29
问题 I generate a sheet, pretty bog standard headers and columns of data. I want to turn on the "Filter" function for the sheet, so the user can easily sort and filter the data. Can I so this using POI? 回答1: Save the first and last cell from filter area, and execute: sheet.setAutoFilter(new CellRangeAddress(firstCell.getRow(), lastCell.getRow(), firstCell.getCol(), lastCell.getCol())); For example, from the below sheet. >x (x, y) 0123456 0|--hhh--| h = header 1|--+++--| + = values 2|--+++--| - =

How to detect a zip-bomb with Java 10

痞子三分冷 提交于 2020-05-25 17:12:10
问题 Apache POI is opening zip-files on a regular basis because Microsoft Excel/Word/... files are zip-files in their newer format. In order to prevent some types of denial-of-service-attacks, it has functionality when opening Zip-files to not read files which expand a lot and thus could be used to overwhelm the main memory by providing a small malicious file which explodes when uncompressed into memory. Apache POI calls this zip-bomb-protection. Up to Java 9 it could use some workaround via

Apache POI XSSFWorkbook throwing NullPointerException for file

倖福魔咒の 提交于 2020-05-23 10:25:07
问题 I have checked every possible question on here with a similar problem, and none of the solutions have worked. I feel like I am missing something really obvious, but I just can't see it. I am on Windows 10, using Eclipse 2019, and the newest Apache POI jar files (not maven) with xmlbeans version 3.1.0. I want to read an xlsx file, but every time I run my code (Which is a basic example I've seen used and run successfully on multiple websites and videos), I receive a "NullPointerException" at

“Provider com.bea.xml.stream.EventFactory not found” when loading XLSX file

折月煮酒 提交于 2020-05-18 00:52:54
问题 I've used Apache POI successfully on Java desktop app, and would like to use it on Android for reading & writing Excel files. Here's my Github repo: https://github.com/anta40/StockChecker Everytime I try to open an XLSX file, eventually the app crashes because of org.apache.poi.javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found Here's the content of my build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig