[Bug 69042] New: Calling `insertNewParagraph` pointing to object in header leads to `ClassCastException`
https://bz.apache.org/bugzilla/show_bug.cgi?id=69042 Bug ID: 69042 Summary: Calling `insertNewParagraph` pointing to object in header leads to `ClassCastException` Product: POI Version: 5.2.3-FINAL Hardware: PC OS: Linux Status: NEW Severity: major Priority: P2 Component: XWPF Assignee: dev@poi.apache.org Reporter: aoelle...@protonmail.com Target Milestone: --- When trying to insert an object into a document via `XWPFDocument#insertNewParagraph(XmlCursor cursor)`, where the cursor points to something in the header/footer, a `ClassCastException` is thrown. The reason for this is in `insertIntoParentElement(IBodyElement iBodyElement, Deque path)`, where I assumed that the element can only be nested in a table, when in reality it can also be in a header or footer. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68183] SXSSFWorkbook should dispose of temporary files when close() is called
https://bz.apache.org/bugzilla/show_bug.cgi?id=68183 PJ Fanning changed: What|Removed |Added Hardware|PC |All OS|Linux |All Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from PJ Fanning --- PR merged -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 63189] Error when cloning sheet with a hyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=63189 PJ Fanning changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from PJ Fanning --- PR617 was merged -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62943] Runtime error trying to set entity expansion limit property
https://bz.apache.org/bugzilla/show_bug.cgi?id=62943 Bug 62943 depends on bug 62692, which changed state. Bug 62692 Summary: WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62692] WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized
https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 PJ Fanning changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62805] Fix Old-Xerces build issues
https://bz.apache.org/bugzilla/show_bug.cgi?id=62805 Bug 62805 depends on bug 62692, which changed state. Bug 62692 Summary: WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68960] The TEXT function in Excel is not parsing a date into the desired format as expected.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68960 PJ Fanning changed: What|Removed |Added Severity|blocker |normal Hardware|Macintosh |All OS|Mac OS X 10.1 |All -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68987] support allowStoredEntriesWithDataDescriptor=true when reading zip data
https://bz.apache.org/bugzilla/show_bug.cgi?id=68987 PJ Fanning changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 69021] HSSF: Java.lang.ClassCastException: class org.apache.poi.hssf.record.DSFRecord cannot be cast to class org.apache.poi.hssf.record.TabIdRecord
https://bz.apache.org/bugzilla/show_bug.cgi?id=69021 PJ Fanning changed: What|Removed |Added OS||All --- Comment #2 from PJ Fanning --- I added a guard around the cast - r1917779 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 69021] HSSF: Java.lang.ClassCastException: class org.apache.poi.hssf.record.DSFRecord cannot be cast to class org.apache.poi.hssf.record.TabIdRecord
https://bz.apache.org/bugzilla/show_bug.cgi?id=69021 --- Comment #1 from someone --- Created attachment 39723 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39723=edit the xls file i use -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 69021] New: HSSF: Java.lang.ClassCastException: class org.apache.poi.hssf.record.DSFRecord cannot be cast to class org.apache.poi.hssf.record.TabIdRecord
https://bz.apache.org/bugzilla/show_bug.cgi?id=69021 Bug ID: 69021 Summary: HSSF: Java.lang.ClassCastException: class org.apache.poi.hssf.record.DSFRecord cannot be cast to class org.apache.poi.hssf.record.TabIdRecord Product: POI Version: unspecified Hardware: PC Status: NEW Severity: normal Priority: P2 Component: HSSF Assignee: dev@poi.apache.org Reporter: mengxiansong2...@163.com Target Milestone: --- I have an very old .xls file,when I use code blow to change its content: ``` String filePath = "D:\\BRD2002.xls"; try { Workbook workbook = new HSSFWorkbook(new FileInputStream(filePath)); Sheet sheet = workbook.getSheetAt(0); int rowIndex = 2; sheet.shiftRows(rowIndex, sheet.getLastRowNum(), 1); Row row = sheet.createRow(rowIndex); row.createCell(0).setCellValue("switch"); FileOutputStream outputStream = new FileOutputStream(filePath); workbook.write(outputStream); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } ``` An Exception came out At row:'workbook.write(outputStream);' Exception details: ``` java.lang.ClassCastException: class org.apache.poi.hssf.record.DSFRecord cannot be cast to class org.apache.poi.hssf.record.TabIdRecord (org.apache.poi.hssf.record.DSFRecord and org.apache.poi.hssf.record.TabIdRecord are in unnamed module of loader 'app') at org.apache.poi.hssf.model.InternalWorkbook.preSerialize(InternalWorkbook.java:1078) at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:1506) at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1424) at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1410) at com.fzm.batch.InsertRowInXLS.main(InsertRowInXLS.java:25) ``` When I commented out the line of code that contains "sheet.shiftRows" and executed it again, there were no exceptions anymore. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 PJ Fanning changed: What|Removed |Added Depends on||66397 Referenced Bugs: https://bz.apache.org/bugzilla/show_bug.cgi?id=66397 [Bug 66397] [PATCH] fix doc of createTempFile in TempFile and replace synchronized with ReentrantLock -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 66397] [PATCH] fix doc of createTempFile in TempFile and replace synchronized with ReentrantLock
https://bz.apache.org/bugzilla/show_bug.cgi?id=66397 PJ Fanning changed: What|Removed |Added Blocks||68983 Referenced Bugs: https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 [Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 --- Comment #3 from Jürgen Zeller --- @PJ Fanning: what does the old standard file io code makes unsafe? I look in the writing my own TempFileCreationStrategy, but would like to know why File.mkdirs() is unsafe, a quick google search didn't reveal it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #9 from J English --- Your recommended solution worked! Thanks again for all your help guys -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68987] support allowStoredEntriesWithDataDescriptor=true when reading zip data
https://bz.apache.org/bugzilla/show_bug.cgi?id=68987 --- Comment #1 from PJ Fanning --- I added r1917587 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68987] New: support allowStoredEntriesWithDataDescriptor=true when reading zip data
https://bz.apache.org/bugzilla/show_bug.cgi?id=68987 Bug ID: 68987 Summary: support allowStoredEntriesWithDataDescriptor=true when reading zip data Product: POI Version: 5.2.3-FINAL Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: OPC Assignee: dev@poi.apache.org Reporter: fannin...@yahoo.com Target Milestone: --- See https://stackoverflow.com/questions/78441630/apache-poi-read-word-then-throw-unsupportedzipfeatureexception-unsupported-featu -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #8 from J English --- Yes, the reason is that we import data from a csv file, which stores the data as comma-delimited String values; thus, when we import the data, all values are imported as a Strings and I use POI to populate the cells in the order specified in the csv file. Also, depending my clients, I can have different variations of excel files, some with multiple numeric columns, which introduces a layer of unpredictability. However, I do understand what you mean. In order for a value to be recognized as a numeric value, I need to parse the value as an integer value before setting that value for the cell. That makes sense to me. I will give that a try. Thank you so much for your help. I really appreciate it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #7 from sfis...@gmail.com --- honestly, the real solution is coerce the values going into the cells to double, that way the underlying framework does not change the cell type to string. from reading the javadoc of the various setCellValue( x ) methods, this seems fairly apparent is there a reason you are trying to push strings into cells that are being typed numeric? is there a reason you are not parsing/converting/coercing them to numeric doubles before insertion? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #6 from J English --- PJ, my bad I forgot to answer your original question. Yes, I did try re-ordering the code by setting the cell type after the cell value, but it displayed the following data in the excel file, which seemed pretty odd. 0 1 2 3 4 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 PJ Fanning changed: What|Removed |Added Resolution|--- |INFORMATIONPROVIDED Status|NEEDINFO|RESOLVED --- Comment #5 from PJ Fanning --- I think you are best off talking to Microsoft. I will close this. There is nothing in the file generated from POI that prevents you from changing the cell type in Microsoft Excel. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #4 from J English --- Thank you both for your inputs. Yes, there are no formulas included the code because I have a customer that wants to add their own custom formulas to the spreadsheet after the file has generated. Also, the is a very slimmed down version of my original code. We normally import data from a csv file, which stores the data as comma-delimited String values; thus, when we import the data, all values are imported as a String. One thing, you might also notice though, and maybe this might be a question for Microsoft, if you attempt to change the cell type for one of the modified cells, the change never take effect. I wasn't sure if there was anything in POI that might be locking the cell type because I am able to update to cell style. For example, try manually changing the cell type to something random like 'Percentage' and you'll see what I'm referring to. Can you please advise if you think the cell type issue might be a POI thing? I think that if the cell type can be updated, it should resolve the issue with the manually added formulas. Thank you -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #3 from PJ Fanning --- *** Bug 68974 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 PJ Fanning changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution|--- |DUPLICATE --- Comment #9 from PJ Fanning --- *** This bug has been marked as a duplicate of bug 68985 *** -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 --- Comment #2 from Nick Burch --- I can't see any formula setting in your code If you set a formula with POI and we don't evaluate it properly, that's our bug (or possibly one of our limitations) If you open a file in Excel, it looks fine, but then Excel doesn't do something correctly when you make changes to it, that sounds a lot like an Excel bug. Given that you don't pay us any money, and you presumably do pay Microsoft quite a bit of money for Excel, I would suggest you report this apparent Excel bug to the people you have a paid-for support contract with... -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 PJ Fanning changed: What|Removed |Added OS||All Status|NEW |NEEDINFO --- Comment #1 from PJ Fanning --- newCell.setCellValue(value); if value is a String - the cell type is set to string this will override the setCellType call you made BEFORE the setCellValue any chance that you could reorder the code to set the type AFTER you set the value? I would suggest that you try using a debugger on the code and you will see what is happening. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68985] New: Unable to edit cell type on excel file that was generated via Apache Poi API (edit)
https://bz.apache.org/bugzilla/show_bug.cgi?id=68985 Bug ID: 68985 Summary: Unable to edit cell type on excel file that was generated via Apache Poi API (edit) Product: POI Version: unspecified Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: jengl...@xifin.com Target Milestone: --- To give a quick synopsis, I'm using Apache POI API to generate an excel file. After the file is generated, I am unable to apply formulas to the any of the modified rows. The reason appears to be related to the cell type of the cells, which cannot be updated after the file has generated. Even if I manually change the cell type of the cells via the Excel spreadsheet, the changes do not take effect. To reproduce, simply run the test below and open the generate excel file. If you manually add '=SUM(A1:A5)' to any cell to get the sum of the cells, you will notice that the formula is not calculating correctly. Any help would be greatly appreciated. Thank you import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import java.io.FileOutputStream; public class TestExcelWriter { public static void main(String[] args) throws Exception { XSSFWorkbook workbook = new XSSFWorkbook(); workbook.setForceFormulaRecalculation(true); XSSFSheet sheet = workbook.createSheet(); int row = 0; String[] values = {"1.00", "2.00", "3.00", "4.00", "5.00",}; for (String value : values) { XSSFRow newRow = sheet.createRow(row); XSSFCell newCell = newRow.createCell(0); newCell.setCellType(CellType.NUMERIC); newCell.setCellValue(value); row++; } FileOutputStream out = new FileOutputStream("outputFile.xlsx"); workbook.write(out); out.close(); } } -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 --- Comment #2 from PJ Fanning --- I added back one check that was removed in the previous patch to the DefaultTempFileCreationStrategy. r1917583 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 Matafagafo changed: What|Removed |Added CC||matafag...@yahoo.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 --- Comment #1 from PJ Fanning --- You can register your own TempFileCreationStrategy. https://github.com/apache/poi/blob/c960ee60709a4059796a13eec3b383ea4363f4fc/poi/src/main/java/org/apache/poi/util/TempFile.java#L44 I would be against reverting the changes to use the Java NIO codebase instead of the insecure java.io.File code. I would even be against having the code fall back to the insecure java.io.File code. If someone can provide a solution that only uses secure code then that is ok. Users can implement their own TempFileCreationStrategy and do whatever they please. ASF default code must be secure in all cases. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 Dominik Stadler changed: What|Removed |Added Severity|critical|regression -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 66397] [PATCH] fix doc of createTempFile in TempFile and replace synchronized with ReentrantLock
https://bz.apache.org/bugzilla/show_bug.cgi?id=66397 --- Comment #4 from Jürgen Zeller --- This patch introduced the bug described in https://bz.apache.org/bugzilla/show_bug.cgi?id=68983, Files.createDirectories() does not work with sym links, see 68983 for details. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68983] New: POI can't create poifiles sub dir if temp dir is a symlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68983 Bug ID: 68983 Summary: POI can't create poifiles sub dir if temp dir is a symlink Product: POI Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: critical Priority: P2 Component: POI Overall Assignee: dev@poi.apache.org Reporter: jzel...@jzeller.eu Target Milestone: --- POI 5.2.5 changed the implementation of DefaultTempFileCreationStrategy.createTempFile() from standard IO to NIO: 5.2.3: final boolean dirExists = (directory.exists() || directory.mkdirs()); 5.2.5: dir = Files.createDirectories(dirPath).toFile(); This leads to an NoSuchFileException if tmpdir is a symlink to a writable, valid directory: Caused by: java.nio.file.NoSuchFileException: /my/tmp/poifiles/poi-sxssf-sheet906981841800128924.xml at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219) at java.base/java.nio.file.Files.newByteChannel(Files.java:371) at java.base/java.nio.file.Files.createFile(Files.java:648) at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:137) at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160) at java.base/java.nio.file.Files.createTempFile(Files.java:868) at org.apache.poi.util.DefaultTempFileCreationStrategy.createTempFile(DefaultTempFileCreationStrategy.java:102) at org.apache.poi.util.TempFile.createTempFile(TempFile.java:67) at org.apache.poi.xssf.streaming.SheetDataWriter.createTempFile(SheetDataWriter.java:100) at org.apache.poi.xssf.streaming.SheetDataWriter.(SheetDataWriter.java:74) at org.apache.poi.xssf.streaming.SheetDataWriter.(SheetDataWriter.java:84) at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheetDataWriter(SXSSFWorkbook.java:387) at org.apache.poi.xssf.streaming.SXSSFSheet.(SXSSFSheet.java:103) at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:694) We needed to rollback to 5.2.3 in production to get POI working again. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68979] NullPointerException in XSSFFormulaEvaluator with reference to missing external workbook
https://bz.apache.org/bugzilla/show_bug.cgi?id=68979 PJ Fanning changed: What|Removed |Added Resolution|--- |DUPLICATE Depends on||67778 Status|NEW |RESOLVED --- Comment #3 from PJ Fanning --- *** This bug has been marked as a duplicate of bug 67778 *** Referenced Bugs: https://bz.apache.org/bugzilla/show_bug.cgi?id=67778 [Bug 67778] null pointer Exception for Area3Dpxg type in ExternalReference in Formula Evaluation -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 67778] null pointer Exception for Area3Dpxg type in ExternalReference in Formula Evaluation
https://bz.apache.org/bugzilla/show_bug.cgi?id=67778 PJ Fanning changed: What|Removed |Added Blocks||68979 CC||apache-bugzilla-sebastian@k ||aselo.de --- Comment #6 from PJ Fanning --- *** Bug 68979 has been marked as a duplicate of this bug. *** Referenced Bugs: https://bz.apache.org/bugzilla/show_bug.cgi?id=68979 [Bug 68979] NullPointerException in XSSFFormulaEvaluator with reference to missing external workbook -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68979] NullPointerException in XSSFFormulaEvaluator with reference to missing external workbook
https://bz.apache.org/bugzilla/show_bug.cgi?id=68979 apache-bugzilla-sebast...@kaselo.de changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #2 from apache-bugzilla-sebast...@kaselo.de --- Thanks for your quick reply - of course I understand your hesitation concerning foreign xlsx files. While digging deeper in it, I just realized that the bug seems to be fixed with version 5.2.5. The ticket may be closed in my opinion; sorry for bothering you with an already fixed bug. It might be worth, though, to add the unit test, or a similar one, to the code base as a regression test. For the record, in case someone stumbles over the same issue or you want to add a regression test: The xlsx file can be easily constructed locally by creating an xlsx file with a single sheet which contains the string "=VLOOKUP(A2;'file:///unknown-file.xlsx'#$unknown_sheet.$B$2:$H$1014;6;0)" in cell A1 (the formular seems weird in this context, but comes from a real application). The stack trace with version 5.2.4 is as follows: java.lang.NullPointerException at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.cacheExternalWorkbookCells(BaseXSSFFormulaEvaluator.java:119) at org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCellValue(BaseXSSFFormulaEvaluator.java:64) at org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateFormulaCell(BaseFormulaEvaluator.java:184) at org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateAllFormulaCells(BaseFormulaEvaluator.java:277) at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateAll(XSSFFormulaEvaluator.java:100) The exception is thrown because the call to getReferencedWorkbooks() in line 116 returns an empty map, causing externalWorkbook to be null. This was not checked in the call externalWorkbook.getSheetIndex(area3DPxg.getSheetName()) in line 119. The commit "[bug-67778] try to make formula eval involving external workbooks more robust" (git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913045 13f79535-47bb-0310-9956-ffa450edef68, git commit ID 236710df, from 2023-10-17), which is included in version 5.2.5, has introduced a null check on externalWorkbook, thus avoiding the NullPointerException. Best regards, Sebastian -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 --- Comment #8 from J English --- Created attachment 39698 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39698=edit zip file contains a simple test class and an excel template Hi PJ, Hopefully this is a lot simpler than the previous version. Simply run the test class. The excel template path should be relative. The excel template contains 1 row and 1 cell as the source row/cell that will be used for all rows. After running the test class, if you manually add '=SUM(A1:A6)' to any cell to get the sum of all modified cells, you will notice that the formula is not calculating correctly. Please let me know if you need anything else. Thank you -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 --- Comment #7 from J English --- OK got it. No worries. I'll try uploading much simpler version of the code. I'll keep you posted. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 --- Comment #6 from PJ Fanning --- I am not going to look any further at that sample. It is far too complicated. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 --- Comment #5 from J English --- Sorry, please use this version of the test class. This version has the correct file names for the csv file, excel template file, and output file. Thank you import java.io.File; public class TestExcelWriter { public static void main(String[] args) throws Exception { File outPutFile = new File("outputFile.xlsx"); String templateFilePath = "template.xlsx"; File csvFile = new File("inputFile.csv"); ExcelWriter excelWriter = new ExcelWriter(); excelWriter.generateExcelFile(outPutFile, templateFilePath, csvFile); } } -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 --- Comment #4 from J English --- Created attachment 39697 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39697=edit zip file that contains class, test class, csv file, excel template, and output files Thank you for your help. I tried adding the recommended line of code (below) to my class, but it unfortunately it did not resolve my issue. workbook.setForceFormulaRecalculation(true); I've attached a zip file that contains a version of my class that can be used to reproduce the issue that I am seeing. I've also included a csv file, an excel template, output files, and a test class to run a quick test of my code. Please let me know if you need anything else. Thank you. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68979] NullPointerException in XSSFFormulaEvaluator with reference to missing external workbook
https://bz.apache.org/bugzilla/show_bug.cgi?id=68979 PJ Fanning changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #1 from PJ Fanning --- Thanks for the reproduction. To be honest, it gives me the shivvers to take xlsx files from random people on the internet. I like to avoid installing them on my laptop. Could you provide the stacktrace and I might be able to avoid going near the xlsx file. No offence intended but I hope you would be suspicious if I sent you and xlsx file. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68979] New: NullPointerException in XSSFFormulaEvaluator with reference to missing external workbook
https://bz.apache.org/bugzilla/show_bug.cgi?id=68979 Bug ID: 68979 Summary: NullPointerException in XSSFFormulaEvaluator with reference to missing external workbook Product: POI Version: 5.2.3-FINAL Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: apache-bugzilla-sebast...@kaselo.de Target Milestone: --- Created attachment 39696 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39696=edit Input file for the unit test to reproduce the behaviour The XSSFFormulaEvaluator may throw a NullPointerException when a cell references an unknown workbook and the evaluator was explicitly told to ignore missing workbooks. I could reproduce the behaviour with versions 5.2.2 (included in jxls 2.14) up to 5.2.4. With version 4.1.2 (included in jxls 2.12), the evaluator reads the file without an error and produces a sheet with a single row and a single cell. This is the behaviour I would still expect with the new version. Here is a unit-test to reproduce the behaviour with the attached file, which only contains a single sheet with a single cell: @Test void testFileWithFormulaReferenceToNonExistingFile() throws IOException { InputStream is = new FileInputStream("test.xlsx"); XSSFWorkbook workbook = new XSSFWorkbook(is); FormulaEvaluator evaluator = new XSSFFormulaEvaluator(workbook); evaluator.setIgnoreMissingWorkbooks(true); evaluator.evaluateAll(); Sheet sheet = workbook.getSheetAt(0); Iterator rowIt = sheet.rowIterator(); Row row = rowIt.next(); Assertions.assertEquals(1, row.getPhysicalNumberOfCells()); } The formula is quite complex (with VLOOKUP, extracted from a real failing example). I did not manage to simplify it without losing the reproducibility of the problem. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68526] Do we have any Apache POI documentation for spreadsheet accessibility
https://bz.apache.org/bugzilla/show_bug.cgi?id=68526 Yulianan87 changed: What|Removed |Added URL||http://202.72.220.154/andro ||id/ Keywords||TestID -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 --- Comment #3 from PJ Fanning --- If you want Excel to calculate the formulas when you open the workbook, you need to call. workbook.setForceFormulaRecalculation(true); POI has some basic support for calculating formula results but a lot of Excel functions are not supported or only partially supported. I would strongly recommend just using setForceFormulaRecalculation(true). https://poi.apache.org/components/spreadsheet/eval.html -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 PJ Fanning changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #2 from PJ Fanning --- The file is useless without the code that demos what you are doing. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 J English changed: What|Removed |Added OS||All --- Comment #1 from J English --- I am current using the 4.1.2 version of Apache POI -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68974] New: Unable to edit cell type on excel file that was generated via Apache Poi API
https://bz.apache.org/bugzilla/show_bug.cgi?id=68974 Bug ID: 68974 Summary: Unable to edit cell type on excel file that was generated via Apache Poi API Product: POI Version: unspecified Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: jengl...@xifin.com Target Milestone: --- Created attachment 39695 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39695=edit Generic excel file that shows the cell type issue To give a quick synopsis, I'm using Apache POI API to generate an excel file. I first collect and print all the data needed into a csv file. I then import the csv file into an excel file using an excel template. When the excel file is finished generating, everything looks as expected. However, when I attempt to change the cell type for any cell, the change never takes effect. I think it might the result of importing all data as String values onto the excel file, but I'm not really sure. I need the ability to update the cell type for specific cells so that our clients can add their custom formulas to the excel after it's been generated. For example, if A1 is a numeric cell with a value = 123.45 and I add the formula to an empty cell '=SUM(A1)', the result the formula return '0'. I've even tried changing the cell type of A1 to Numeric, but the formula still returns 0. Can someone please confirm if these is a bug, or if there is anything I can do to allow the manually cell type edits to take effect after the excel file has been generated? I've attached a generic xlsx file that shows the issue that I am referring to. I'm trying to run SUMIF formula to subtotal amounts that have a certain value in a description column. Thank you. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68968] File Hash incorrect for poi-ooxml-5.2.5.jar
https://bz.apache.org/bugzilla/show_bug.cgi?id=68968 PJ Fanning changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INFORMATIONPROVIDED --- Comment #2 from PJ Fanning --- Try downloading the jar again. Maybe you have an incomplete download. The hashes are generated by Nexus. So complain to them if you think hashes are wrong. Closing. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68968] File Hash incorrect for poi-ooxml-5.2.5.jar
https://bz.apache.org/bugzilla/show_bug.cgi?id=68968 wonder_b...@gmx.ch changed: What|Removed |Added OS||All --- Comment #1 from wonder_b...@gmx.ch --- sorry, it should read ... versus: poi-ooxml-5.2.5.jar.sha256 -> ad77533831759f42c7ba569c6c6045298cd3058db6ba2d17ab5a43ab10cba3bc It is wrong though.. Thanks -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68968] New: File Hash incorrect for poi-ooxml-5.2.5.jar
https://bz.apache.org/bugzilla/show_bug.cgi?id=68968 Bug ID: 68968 Summary: File Hash incorrect for poi-ooxml-5.2.5.jar Product: POI Version: unspecified Hardware: PC Status: NEW Severity: critical Priority: P2 Component: POI Overall Assignee: dev@poi.apache.org Reporter: wonder_b...@gmx.ch Target Milestone: --- Please check the file hashes for the poi-ooxml-5.2.5.jar and associated source and doc files. I think they are incorrect: e.g.: https://repo1.maven.org/maven2/org/apache/poi/poi/5.2.5/poi-ooxml-5.2.5.jar versus: poi-5.2.5.pom.asc.sha256: -> 3d426a458bfb111a1006cc51562371284be84aef2acdee534863b42eb089a34b WIN10: -> c6ad01a9ec5b -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68960] The TEXT function in Excel is not parsing a date into the desired format as expected.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68960 Nick Burch changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #1 from Nick Burch --- The code for this is: https://github.com/apache/poi/blob/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/TextFunction.java If you're able to fix this, please open a PR! -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68960] The TEXT function in Excel is not parsing a date into the desired format as expected.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68960 Akshat Nama changed: What|Removed |Added CC||akshatnama1...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68960] New: The TEXT function in Excel is not parsing a date into the desired format as expected.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68960 Bug ID: 68960 Summary: The TEXT function in Excel is not parsing a date into the desired format as expected. Product: POI Version: unspecified Hardware: Macintosh OS: Mac OS X 10.1 Status: NEW Severity: blocker Priority: P2 Component: POI Overall Assignee: dev@poi.apache.org Reporter: akshatnama1...@gmail.com Target Milestone: --- When using the TEXT function in Excel to format a date into a different format, the provided date is not being parsed into the desired format. For example, when using the formula TEXT("01/02/2021","-mm-dd"), the expected outcome is to have the date "01/02/2021" formatted into the format "-mm-dd". However, instead of getting the desired formatted date, the function returns the same date that was provided without any changes. This behavior is inconsistent with the expected functionality of the TEXT function, which should format the provided date into the specified format. As a result, users are unable to achieve the desired date formatting using the TEXT function, leading to potential issues in data presentation and analysis. This bug significantly impacts the usability and reliability of the TEXT function in Excel, especially for users who rely on precise date formatting for their data analysis and reporting needs. Therefore, it is essential to address this issue promptly to ensure the accurate functioning of the TEXT function and improve the overall user experience. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62692] WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized
https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 --- Comment #9 from Willy --- Solved, at least for this case, by modifying module.xml in wildfly/modules/system/layers/base/org/apache/xerces/main and preventing the loading of xerces's jar file. Let's hope this doesn't break other things. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62805] Fix Old-Xerces build issues
https://bz.apache.org/bugzilla/show_bug.cgi?id=62805 Bug 62805 depends on bug 62692, which changed state. Bug 62692 Summary: WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62943] Runtime error trying to set entity expansion limit property
https://bz.apache.org/bugzilla/show_bug.cgi?id=62943 Bug 62943 depends on bug 62692, which changed state. Bug 62692 Summary: WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 62692] WildFly XML parser not properly supported - Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized
https://bz.apache.org/bugzilla/show_bug.cgi?id=62692 Willy changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED Version|4.0.0-FINAL |5.2.3-FINAL --- Comment #8 from Willy --- I stumbled on this after trying to use 5.2.5 for creating a DOCX file. import org.apache.poi.xwpf.usermodel.XWPFDocument; public class WordTest { public static void main(String[] args)throws Exception { //Blank Document XWPFDocument document = new XWPFDocument(); //Write the Document in file system FileOutputStream out = new FileOutputStream( new File("createdocument.docx")); document.write(out); out.close(); System.out.println("createdocument.docx written successully"); } } Gives the same error today. WildFly Full 24.0.0.Final xercesImpl-2.12.0.SP03.jar -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68924] Text Field (Page number) does not import correctly
https://bz.apache.org/bugzilla/show_bug.cgi?id=68924 --- Comment #1 from Aleksei --- Created attachment 39679 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39679=edit difference between expected and imported slide -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68924] New: Text Field (Page number) does not import correctly
https://bz.apache.org/bugzilla/show_bug.cgi?id=68924 Bug ID: 68924 Summary: Text Field (Page number) does not import correctly Product: POI Version: 5.2.3-FINAL Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: XSLF Assignee: dev@poi.apache.org Reporter: aleksey...@mail.ru Target Milestone: --- Created attachment 39678 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39678=edit test page number The page number does not automatically increase when you import a slide. The problem is that the tag is replaced with an tag. To reproduce: InputStream is = new FileInputStream("test page number.pptx"); XMLSlideShow ppt = new XMLSlideShow(is); FileOutputStream out = new FileOutputStream("test page number output.pptx"); XSLFSlide slide = ppt.getSlides().get(0); XSLFSlide newSlide = ppt.createSlide(); newSlide.importContent(slide); ppt.write(out); Result: The page number on slide 2 is "Page 1" when it should be "Page 2". -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68922] Text with a line break does not import correctly
https://bz.apache.org/bugzilla/show_bug.cgi?id=68922 --- Comment #1 from Aleksei --- Created attachment 39677 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39677=edit difference between original and imported slide -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68922] New: Text with a line break does not import correctly
https://bz.apache.org/bugzilla/show_bug.cgi?id=68922 Bug ID: 68922 Summary: Text with a line break does not import correctly Product: POI Version: 5.2.3-FINAL Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: XSLF Assignee: dev@poi.apache.org Reporter: aleksey...@mail.ru Target Milestone: --- Created attachment 39676 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39676=edit original PPT with line break A slide with text with a line break does not import correctly, resulting in a corrupted file that does not open. The problem is that the tag is replaced with an empty tag. Possible duplicate: https://bz.apache.org/bugzilla/show_bug.cgi?id=68668 To reproduce: InputStream is = new FileInputStream("test line break.pptx"); XMLSlideShow ppt = new XMLSlideShow(is); FileOutputStream out = new FileOutputStream("test line break output.pptx"); XSLFSlide slide = ppt.getSlides().get(0); XSLFSlide newSlide = ppt.createSlide(); newSlide.importContent(slide); ppt.write(out); Result: The "test line break output.pptx" file is corrupt. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68874] For conditional formatting, areas should be cumulated for duplications
https://bz.apache.org/bugzilla/show_bug.cgi?id=68874 --- Comment #1 from PJ Fanning --- The POI community is pretty much moribund. Unfortunately, if you want a fix, you basically need to do it yourself. If you provide a PR or patch, it might be merged. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68874] New: For conditional formatting, areas should be cumulated for duplications
https://bz.apache.org/bugzilla/show_bug.cgi?id=68874 Bug ID: 68874 Summary: For conditional formatting, areas should be cumulated for duplications Product: POI Version: 5.2.3-FINAL Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: SS Common Assignee: dev@poi.apache.org Reporter: jdcof...@gmail.com Target Milestone: --- Created attachment 39655 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39655=edit Reproducer For a conditional formatting rule, it is possible to define multiple areas while looking for duplications. In my reproducer, the area to check duplication is (A0;A1:H1). In Excel, if A0 and H1 have the same value, the rule triggers the conditional formatting. With Apache POI, areas A0 and A1:H1 are checked one after the other. The rule is then not triggered. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 63189] Error when cloning sheet with a hyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=63189 --- Comment #4 from Kwon Ohyoung --- I have published github PR : https://github.com/apache/poi/pull/617 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 63189] Error when cloning sheet with a hyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=63189 Kwon Ohyoung changed: What|Removed |Added CC||ohkwo...@outlook.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 63189] Error when cloning sheet with a hyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=63189 --- Comment #3 from Kwon Ohyoung --- To fundamentally solve this problem, I think we need to distinguish between internal file-based relationships and reference-based relationships like open-xml-sdk. feat: https://github.com/dotnet/Open-XML-SDK/blob/main/src/DocumentFormat.OpenXml.Framework/Packaging/PartRelationshipsFeature.cs If we do that, I think it will be a bigger task than a minor version up rather than just a single bug patch. If it were a simple patch at the single commit level, I thought about contributing, but it seems to be at the level of feature addition/change beyond multiple commits, so I think it is something that needs to be reviewed within the poi community. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 63189] Error when cloning sheet with a hyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=63189 --- Comment #2 from Kwon Ohyoung --- This issue is due to hyperlinks connected to picture objects not being properly handled. The picture object and the hyperlink object are stored in drawing1.xml, and the picture file location to be displayed and hyperlink target information are stored in drawing1.xml.rels. ㅆhe correlation information stored in drawing1.xml.rels is processed based on the existence of the actual target file when copying from poi. However, the hyperlink target information does not have actual file information, so it is copied with the wrong target when copying. original relationship in /xl/drawings/_rels/drawing1.xml.rels: http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"/> copied relationship in /xl/drawings/_rels/drawing2.xml.rels: http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"/> When the PackageRelationship.getTargetURI() method returns, the URI is normalized to change it to the target file path. In this process, the fragment information (#Sheet3!A1) is lost and the file name (/xl/drawing1.xml) will remain. However, /xl/drawing1.xml is recognized as an invalid file because it cannot be a hyperlink target. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68854] org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be read.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68854 PJ Fanning changed: What|Removed |Added OS||All Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from PJ Fanning --- Marking as duplicate of 60833 *** This bug has been marked as a duplicate of bug 60833 *** -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 60833] Initialisation of record 0x31 left 4 bytes remaining still to be read.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60833 --- Comment #13 from PJ Fanning --- *** Bug 68854 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 60833] Initialisation of record 0x31 left 4 bytes remaining still to be read.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60833 --- Comment #12 from PJ Fanning --- Similar issue in https://bz.apache.org/bugzilla/show_bug.cgi?id=68854 (with reproducible case) -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68854] org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be read.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68854 --- Comment #1 from qi20088 <2099...@qq.com> --- Created attachment 39646 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39646=edit attached is the read excel file. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68854] New: org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be read.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68854 Bug ID: 68854 Summary: org.apache.poi.hssf.record.RecordInputStream$LeftoverD ataException: Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be read. Product: POI Version: unspecified Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: 2099...@qq.com Target Milestone: --- Created attachment 39645 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39645=edit org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be read. The code is shown below,The code is shown below: import org.apache.poi.ss.usermodel.*; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; public class ExcelReaderExample { public static void main(String[] args) { String filePath = "D:\\坪山区石楼路(汤达路-汤坑二路)市政工程-道路工程(单位工程).xls";; // 更换为你的文件路径 try { // 使用WorkbookFactory创建合适的Workbook实例,自动识别文件格式 Workbook workbook = WorkbookFactory.create(new FileInputStream(new File(filePath))); // 获取第一个工作表 Sheet sheet = workbook.getSheetAt(0); // 遍历所有行 for (Row row : sheet) { // 遍历所有单元格 for (Cell cell : row) { // 根据单元格类型读取数据 switch (cell.getCellType()) { case STRING: System.out.print(cell.getRichStringCellValue().getString() + "\t"); break; case NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { System.out.print(cell.getDateCellValue() + "\t"); } else { System.out.print(cell.getNumericCellValue() + "\t"); } break; case BOOLEAN: System.out.print(cell.getBooleanCellValue() + "\t"); break; case FORMULA: System.out.print(cell.getCellFormula() + "\t"); break; default: System.out.print(" " + "\t"); } } System.out.println(); } workbook.close(); } catch (IOException ex) { ex.printStackTrace(); } } } The following error message appears when running the code. Exception in thread "main" org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be read. at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:188) at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:235) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:488) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:343) at org.apache.poi.hssf.usermodel.HSSFWorkbookFactory.createWorkbook(HSSFWorkbookFactory.java:64) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:167) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:112) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:253) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:221) at com.costbox.common.dataanalyze.test.ExcelReaderExample.main(ExcelReaderExample.java:14) Process finished with exit code 1 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 60833] Initialisation of record 0x31 left 4 bytes remaining still to be read.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60833 qi20088 <2099...@qq.com> changed: What|Removed |Added CC||2099...@qq.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68384] Incorrect numbering when convert PPTX to image if the slide contains sub-bullet/sub-numbering.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68384 --- Comment #4 from PJ Fanning --- Hi Yan. Apache POI is a free open source project with not many active developers. The fastest way to get something fixed is to do yourself. You will win no friends demanding that unpaid volunteers fix issues for you ASAP. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68384] Incorrect numbering when convert PPTX to image if the slide contains sub-bullet/sub-numbering.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68384 --- Comment #3 from Yan --- We would like this issue to be resolved asap. Please provide a timeline on when the issue will be resolved. Thanks. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68384] Incorrect numbering when convert PPTX to image if the slide contains sub-bullet/sub-numbering.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68384 Yan changed: What|Removed |Added Status|NEEDINFO|NEW -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68384] Incorrect numbering when convert PPTX to image if the slide contains sub-bullet/sub-numbering.
https://bz.apache.org/bugzilla/show_bug.cgi?id=68384 --- Comment #2 from Yan --- Created attachment 39639 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39639=edit Sample PPTX file Attachment shown is the pptx file we uploaded. There is incorrect numbering when convert PPTX to image if the slide contains sub-bullet/sub-numbering using XSLFSlide.draw(). PPTX content: 1. Text a. Text b. Text c. Text 2. Text 3. Text After conversion: 1. Text b. Text c. Text d. Text 5. Text 6. Text -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 66337] In-Memory HSSF warns about missing SummaryInformation
https://bz.apache.org/bugzilla/show_bug.cgi?id=66337 --- Comment #10 from markuswue...@hotmail.com --- Hi Thanks for your reply. You're right, the change is included. What i don't understand is, if i need to call workbook#createInformationProperties() after object creation so that it is fully initialized: > HSSFWorkbook hssfWorkbook = new HSSFWorkbook(); > hssfWorkbook.createInformationProperties(); If i do this, i get a new warning about a missing codepage when calling hssfWorkbook#write(OutputStream): "The codepage property is not set although a dictionary is present. Defaulting to ISO-8859-1." Is there something missing in the initialization? Thanks for the help. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 --- Comment #7 from Felix König --- I can confirm that with 5.2.6-SNAPSHOT it works again, just as it did with 5.2.3, thanks! -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 Dominik Stadler changed: What|Removed |Added Resolution|--- |FIXED Status|NEEDINFO|RESOLVED --- Comment #6 from Dominik Stadler --- Nice! See r1916297 for a some new unit tests which try to verify the different cases via mocking of exceptions in the low-level font-system so we get coverage of this tricky bit of code. So as far as we see it will be fixed in the next release, please reopen if your local tests still show a problem. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 --- Comment #5 from PJ Fanning --- I reread the if and it looks like it should be ok. So POI 5.2.6 should get us back to the POI 5.2.3 behaviour, -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 Dominik Stadler changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #4 from Dominik Stadler --- Please take another close look, https://github.com/apache/poi/commit/209e8fc6599803c7cfe061f7755d6e19d9c14201 just includes a few more types of exception without "reverting" the previous changes. The "and" condition was switched, but this does not change the result of the condition. I did some more tests locally and I think the latest version on master is actually working as expected now. It handles RuntimeException as well via the "!isFatal" check. Felix, can you test with a recent nightly build and report if this makes it work again for you. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 --- Comment #3 from PJ Fanning --- https://github.com/apache/poi/commit/209e8fc6599803c7cfe061f7755d6e19d9c14201 effectively undoes my change. With 209e8fc6599803c7cfe061f7755d6e19d9c14201, RuntimeExceptions will again be thrown instead of the default char width being returned. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 --- Comment #2 from Dominik Stadler --- As this is a RuntimeException, I think this case is unrelated to the recent changes around "isFatal", but was broken when we switched from catching Throwable via r1907443 and none of the changes afterwards affected handling of RuntimeException any more. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68779] New: Mixed cell reference is being malformatted
https://bz.apache.org/bugzilla/show_bug.cgi?id=68779 Bug ID: 68779 Summary: Mixed cell reference is being malformatted Product: POI Version: 5.2.3-FINAL Hardware: PC Status: NEW Severity: critical Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: baha.merzou...@bertschinnovation.com Target Milestone: --- When creating a conditional formatting rule using formula String such as: ISNUMBER(SEARCH(ADDRESS(MATCH($C1,INDIRECT(HLOOKUP($B1,CategoryLookup,4,0)),0)+1,COLUMN(INDIRECT(HLOOKUP($B1,CategoryLookup,4,0))),4),$ref.E$1)) --Code snippet-- SheetConditionalFormatting sheetCF = sheet.getSheetConditionalFormatting(); ConditionalFormattingRule rule = sheetCF.createConditionalFormattingRule( "ISNUMBER(SEARCH(ADDRESS(MATCH($C1,INDIRECT(HLOOKUP($B1,CategoryLookup,4,0)),0)+1,COLUMN(INDIRECT(HLOOKUP($B1,CategoryLookup,4,0))),4),$ref.E$1))"); PatternFormatting fill = rule.createPatternFormatting(); fill.setFillBackgroundColor( IndexedColors.YELLOW.index); fill.setFillPattern( PatternFormatting.SOLID_FOREGROUND); ConditionalFormattingRule[] cfRules = new ConditionalFormattingRule[] { rule }; CellRangeAddress[] regions = new CellRangeAddress[] { CellRangeAddress.valueOf( "D1:L1") }; sheetCF.addConditionalFormatting( regions, cfRules); -- The formatting rule from the generated xslx file is written as follow: ISNUMBER(SEARCH(ADDRESS(MATCH($C1,INDIRECT(HLOOKUP($B1,CategoryLookup,4,0)),0)+1,COLUMN(INDIRECT(HLOOKUP($B1,CategoryLookup,4,0))),4),$ref.e$1)) The problem seems to be reproducible with every mixed cell referencing; in this example $ref.e$1 , I attempted the other way around $ref.$E1 fixed column changing row same problem. The fact that the Alpha index of the cell is lower cased is breaking it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 --- Comment #1 from PJ Fanning --- the code has changed in trunk see https://github.com/apache/poi/commits/08436ddf7fd8039118ff073b8dac02b4b5e67774/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java I keep trying to loosen the check so that it works for everyone but then my changes keep being adjusted - so that I don't know if the latest code just reverts back to the broken behaviour. You can get snapshot jars to test with - from https://ci-builds.apache.org/job/POI/job/POI-DSL-1.8/lastSuccessfulBuild/artifact/ -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68778] New: POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration"
https://bz.apache.org/bugzilla/show_bug.cgi?id=68778 Bug ID: 68778 Summary: POI 3.5.4 "Fontconfig head is null, check your fonts or fonts configuration" Product: POI Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: regression Priority: P2 Component: SXSSF Assignee: dev@poi.apache.org Reporter: de.felix.koe...@gmail.com Target Milestone: --- We are running a Quarkus application with Docker, and the base image is an UBI8 (`FROM docker-redhat.sopdock/ubi8/openjdk-21-runtime:1.18`). We are currently using `org.apache.poi:poi-ooxml:5.2.3` with `SXSSFSheet`s. We are *not* using `sheet.trackAllColumnsForAutoSizing()` because that requires Fonts to be installed, which we don't have inside our Docker image. However, after updating to 5.2.5, we get the error `Fontconfig head is null, check your fonts or fonts configuration` regardless. I believe this might have been caused by [this change](https://github.com/apache/poi/commit/43551babf1cf628aa184a2f9445412815781dc9e) in 5.2.4: ```diff diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java index 44caba42178..d454fc10829 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java @@ -63,8 +63,8 @@ protected SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet, int randomAccessW setRandomAccessWindowSize(randomAccessWindowSize); try { _autoSizeColumnTracker = new AutoSizeColumnTracker(this); -} catch (Throwable t) { -LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", t); +} catch (UnsatisfiedLinkError | InternalError e) { +LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e); } } @@ -96,8 +96,8 @@ public SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet) throws IOException { setRandomAccessWindowSize(_workbook.getRandomAccessWindowSize()); try { _autoSizeColumnTracker = new AutoSizeColumnTracker(this); -} catch (Throwable t) { -LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", t); +} catch (UnsatisfiedLinkError | InternalError e) { +LOG.atWarn().log("Failed to create AutoSizeColumnTracker, possibly due to fonts not being installed in your OS", e); } } diff --git a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java index d55e3634d52..13016c4 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java @@ -300,12 +300,12 @@ public static int getDefaultCharWidth(final Workbook wb) { try { TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext); return (int) layout.getAdvance(); -} catch (Throwable t) { +} catch (UnsatisfiedLinkError | NoClassDefFoundError | InternalError e) { if (ignoreMissingFontSystem) { return DEFAULT_CHAR_WIDTH; } -throw t; +throw e; } } ``` Where previously all Throwables were caught, and now only `UnsatisfiedLinkError | NoClassDefFoundError | InternalError` do. The "Fontconfig head is null"-error is a RuntimeException: `throw new RuntimeException(fontconfigErrorMessage);` -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 58138] The Conditional Formatting code should also work with org.apache.poi.ss.usermodel.Color, as well as shorts
https://bz.apache.org/bugzilla/show_bug.cgi?id=58138 --- Comment #3 from Godrej Woodscape --- https://agelooksataging.ning.com/profile/PrestigeRaintreePark628 https://www.gamblingtherapy.org/forum/users/raintreeparkprice/ https://gwoodscapeoverview.wistia.com/medias/iauw67zpps https://www.cafepress.com/profile/gwoodscapeprice https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15193499 http://www.self.gutenberg.org/Members/woodscapesprice https://sketchfab.com/woodscapesprice https://sketchfab.com/3d-models/godrej-woodscapes-modern-apartment-unit-32e28f52351649a9a4fc244c9d3eb877 https://woodscapesprice.gr-site.com/ https://peatix.com/user/21394009/view https://www.tripadvisor.in/Profile/woodscapeprice https://woodscapesprice.amebaownd.com/posts/52271610 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 66878] Invalid URL entered by user as hyperlink target causes exception when parsing.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66878 --- Comment #3 from 大雨哗啦啦 <1500634...@qq.com> --- this uselly happend,when your excel cell value is contains "@",or some hyperlink. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 66878] Invalid URL entered by user as hyperlink target causes exception when parsing.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66878 --- Comment #2 from 大雨哗啦啦 <1500634...@qq.com> --- // Target converted in URI URI target = PackagingURIHelper.toURI("http://invalid.uri;); // dummy url String value = element.getAttribute(PackageRelationship.TARGET_ATTRIBUTE_NAME); try { // when parsing of the given uri fails, we can either // ignore this relationship, which leads to IllegalStateException // later on, or use a dummy value and thus enable processing of the // package target = PackagingURIHelper.toURI(value); } catch (URISyntaxException e) { LOG.atError().withThrowable(e).log("Cannot convert {} in a valid relationship URI-> dummy-URI used", value); } -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 66878] Invalid URL entered by user as hyperlink target causes exception when parsing.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66878 --- Comment #1 from 大雨哗啦啦 <1500634...@qq.com> --- (In reply to thill from comment #0) > An invalid value entered into the document for a hyperlink causes an > exception. This is the destination of the hyperlink. > > As this is a user entered value, I'm not sure why it should ever be looked > at. I don't believe there is any validation, so this field can have any > garbage in it. It should be ignored by POI. > > Version is whatever comes with Apache Tika 2.7.0 > > > org.apache.poi.openxml4j.opc.PackageRelationshipCollection - Cannot convert > https://cloud.google.com/bigtable/docs/backups#what-for%20https://cloud. > google.com/bigtable/docs/release-notes#December_08_2022 in a valid > relationship URI-> dummy-URI used > java.net.URISyntaxException: Illegal character in fragment at index 110: > https://cloud.google.com/bigtable/docs/backups#what-for%20https://cloud. > google.com/bigtable/docs/release-notes#December_08_2022 > at java.base/java.net.URI$Parser.fail(URI.java:2974) > at java.base/java.net.URI$Parser.checkChars(URI.java:3145) > at java.base/java.net.URI$Parser.parse(URI.java:3189) > at java.base/java.net.URI.(URI.java:623) > at > org.apache.poi.openxml4j.opc.PackagingURIHelper.toURI(PackagingURIHelper. > java:723) > at > org.apache.poi.openxml4j.opc.PackageRelationshipCollection. > parseRelationshipsPart(PackageRelationshipCollection.java:358) > at > org.apache.poi.openxml4j.opc.PackageRelationshipCollection. > (PackageRelationshipCollection.java:160) > at > org.apache.poi.openxml4j.opc.PackageRelationshipCollection. > (PackageRelationshipCollection.java:130) > at > org.apache.poi.openxml4j.opc.PackagePart.loadRelationships(PackagePart.java: > 565) > at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:751) > at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:322) > at > org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory. > parse(OOXMLExtractorFactory.java:123) > at > org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java: > 115) > at > org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:298) > at > org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:298) > at > org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:195) > at org.apache.tika.Tika.parseToString(Tika.java:525) > at org.apache.tika.Tika.parseToString(Tika.java:495) > at > com.purato.index.documenthandler.TikaDocumentHandler. > getText(TikaDocumentHandler.java:52) This just a error log which catch by itself. The comment in code description like this: // when parsing of the given uri fails, we can either // ignore this relationship, which leads to IllegalStateException // later on, or use a dummy value and thus enable processing of the // package In it's org.apache.poi.ooxml.openxmlj4.opc.PackageRelationshipCollection class, at line 357. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68703] IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=68703 PJ Fanning changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED OS|Mac OS X 10.1 |All -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68714] New: Operator BETWEEN should work both ways
https://bz.apache.org/bugzilla/show_bug.cgi?id=68714 Bug ID: 68714 Summary: Operator BETWEEN should work both ways Product: POI Version: 5.2.3-FINAL Hardware: PC OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: SS Common Assignee: dev@poi.apache.org Reporter: jdcof...@gmail.com Target Milestone: --- Created attachment 39610 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39610=edit Reproducer with conditional formatting rules With Excel, the conditional formatting the rule "compare cell between 2 values" will evaluate the formula both ways: - val1 < cell.value < val2 - val2 < cell.value < val1 There is no assumption what is the lowest value and the highest one. With Apache POI, the evaluation is done one way which suppose that the lowest value is the first one and the highest one is the second: - return cellValue.compareTo(v1) >= 0 && cellValue.compareTo(v2) <= 0; https://github.com/apache/poi/blob/ae2f0945cd2ab37260e46ab46c54b8f68a131aea/poi/src/main/java/org/apache/poi/ss/formula/OperatorEnum.java#L92 As a consequence, each time the lowest value is passed as a second value, the expression is always false. Code should look like: return (cellValue.compareTo(v1) >= 0 && cellValue.compareTo(v2) <= 0 ) || ((cellValue.compareTo(v1) <= 0 && cellValue.compareTo(v2) >= 0 )) ; -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68703] IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=68703 --- Comment #4 from PJ Fanning --- trying again with r1916108 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68703] IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=68703 --- Comment #3 from PJ Fanning --- reverted with r1916106 - I will have to come back to this. With POI these days, it seems almost impossible to change code to suit one user without breaking the code for another. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68703] IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=68703 --- Comment #2 from PJ Fanning --- added r1916105 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68703] IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=68703 --- Comment #1 from PJ Fanning --- Looks like you are right about that newTextRun change. The XSLFTableCell class overrides this method and returns an XSLFCellTextRun instead of a XSLFTextRun. I will revert that change. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68703] New: IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=68703 Bug ID: 68703 Summary: IllegalArgumentException: Unexpected color choice CTFontCollectionImpl when reading font color for a table cell Product: POI Version: unspecified Hardware: PC OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: XSLF Assignee: dev@poi.apache.org Reporter: he...@canva.com Target Milestone: --- Created attachment 39609 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39609=edit Zip file containing a Maven project that reproduces the issue Affected Version: 5.2.5 (5.2.4 possibly affected as well) Issue: When parsing some PowerPoint files with tables in Apache POI version 5.2.5 (and possibly 5.2.4), attempting to retrieve the font color for text runs within the table cell triggers the following exception: ``` Exception in thread "main" java.lang.IllegalArgumentException: Unexpected color choice: class org.openxmlformats.schemas.drawingml.x2006.main.impl.CTFontCollectionImpl at org.apache.poi.xslf.usermodel.XSLFColor.toColor(XSLFColor.java:161) at org.apache.poi.xslf.usermodel.XSLFColor.(XSLFColor.java:66) at org.apache.poi.xslf.usermodel.XSLFTableCell$XSLFCellTextRun.getFontColor(XSLFTableCell.java:755) at com.example.Main.main(Main.java:21) ``` Steps to Reproduce: 1. Download the attached zip file containing a Maven project. 2. Unzip the folder and navigate to its directory using the command line. 3. Run `mvn install` followed by `mvn exec:java`. 4. Observe the `IllegalArgumentException` that is thrown during execution. We suspect that the commit causing this issue is https://github.com/apache/poi/commit/624f83431065e1a7613f1f044f1820c27e504266#diff-f80c56131e376f24468d40928f5717820b38f1ebea9d16147b870763f8b682c7R78 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 68701] New: setFontColor not works with XSLFHyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=68701 Bug ID: 68701 Summary: setFontColor not works with XSLFHyperlink Product: POI Version: unspecified Hardware: PC OS: other Status: NEW Severity: normal Priority: P2 Component: XSLF Assignee: dev@poi.apache.org Reporter: amustaqu...@gmail.com Target Milestone: --- Hi there, Thank you for maintaining the POI package, I encountered an issue with the package when I was trying to create a hyperlink and after that, I changed the font colour of the text. It is not happening and seems to be a bug. Here is the repo link to the repo that contains minimal steps to reproduce the bug. Github repo link: https://github.com/amustaque97/hyperlink-font-color/tree/main How to run the project: I'm not well-versed in the Java system. So cannot write the whole steps clearly but you need to run the `org.example.Main` path. IT will generate an `output.pptx` file. I have already added the same file for investigation purposes. Expectation: Text font colour should change to red. Actual Behaviour: The font colour is changed to something different but not red. my machine is: MacOs 14.3.1 Thank you! -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org