Re: new to POI, help needed!!

2018-10-01 Thread Andreas Reichel
On Sun, 2018-09-30 at 14:05 -0700, jzfwang wrote: > org.apache.commons.compress You need that library, which is (for any reason) not part of the poi- package. Best regards

POI 4.0 SXSSF: This archive contains unclosed entries

2018-10-31 Thread Andreas Reichel
Dear All, the new 4.0 seems to have a problem when writing large XLSX files (e.g. >100k rows but less than 1 Mill. rows) using SXSSFWorkbook: java.io.IOException: This archive contains unclosed entries. at org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.finish (ZipArchive

Re: POI 4.0 SXSSF: This archive contains unclosed entries

2018-10-31 Thread Andreas Reichel
We have tested our particular use case 3 times each with 4.0 and 3.17 (exactly the same code, exactly the same data). While 3.17 works w/o any adjustments, 4.0 throws this error and leaves an invalid XLSX file. Best regardsAndreas On Wed, 2018-10-31 at 18:42 +0700, Andreas Reichel wrote: > D

Re: POI 4.0 SXSSF: This archive contains unclosed entries

2018-10-31 Thread Andreas Reichel
nclude some code that > you use totrigger this? > Thanks... Dominik. > On Wed, Oct 31, 2018 at 3:08 PM Andreas Reichel < > andr...@manticore-projects.com> wrote: > > We have tested our particular use case 3 times each with 4.0 and > > 3.17(exactly the same code, exactly th

Re: emulate saveAs

2018-11-12 Thread Andreas Reichel
Does not SXSSF Workbook have a constructor based on an existing XSSF (template) Workbook? This will allow to create a new SXSSF workbook, add a sheet with content and then to write out the new file w/o tampering with the existing template? Best regardsAndreas On Mon, 2018-11-12 at 20:54 -0700, Rob

Re: Reg: POI-4.0 Issue

2018-12-19 Thread Andreas Reichel
Good Morning, it is related to 4 GB size limits and the use of ZIP64, please see https://bz.apache.org/bugzilla/show_bug.cgi?id=62872 My understanding is, that you can enforce the use of ZIP64 now although you have decide by yourself when to switch it on. Also ZIP64 is not supported by LibreOffic

Re: Reg: POI-4.0 Issue

2018-12-19 Thread Andreas Reichel
. > > Thank you. > > Regards, > V. Dillibabu > > On Thu, Dec 20, 2018 at 5:49 AM Andreas Reichel < > andr...@manticore-projects.com> wrote: > > Good Morning, > > > > > > > > it is related to 4 GB size limits and the use of ZIP64, please

Re: POI 4.1.1 please release soon and often

2019-10-08 Thread Andreas Reichel
Dear All, compliments. We would like to throw our hat in too. The nightly builds 4.1.1 contain two massive improvements/fixes for very large data/files. One related to memory consumption and one related to writing Zip64 files. We have been "forced" to deploy these nightly snapshots to four produc

Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999

2019-10-17 Thread Andreas Reichel
Dear All, compliments of the day. We face some challenges with reading values from Spread Sheets. Example: the numeric cell has the value = 0.1066913 and when reading that value with POI we receive the double = 0.106691299. This turns into a problem, when writing these figures into a da

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999

2019-10-17 Thread Andreas Reichel
Hi Andi and Team, thank you for prompt response. On Thu, 2019-10-17 at 20:11 -0700, kiwiwings wrote: > this issue pops up every now and then. Please have a look at > http://apache-poi.1045710.n5.nabble.com/Floating-point-behaviour-difference-between-POI-and-Excel-td5715765.html I will read thro

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> Problem only with Excel, NOT with LibreOffice

2019-10-18 Thread Andreas Reichel
All, it gets interesting: I actually did not want to send the original file and so I edited that file in LibreOffice, removed all the unneeded worksheets and saved it. Guess what?! The test output looks correct now: 0.0813613 0.089153 0.10929 0.097758 0.0716913 0.1066913 0.082126 0.0866913 0.0966

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> Problem only with Excel, NOT with LibreOffice

2019-10-19 Thread Andreas Reichel
"510"?! On Sat, 2019-10-19 at 13:53 +0700, Andreas Reichel wrote: > All, > > it gets interesting: I actually did not want to send the original > file and so I edited that file in LibreOffice, removed all the > unneeded worksheets and saved it. > Guess what?! The t

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> Problem only with Excel, NOT with LibreOffice

2019-10-19 Thread Andreas Reichel
Apologies, wrong file. Correction, Excel wrote: 26 376 436

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999

2019-10-19 Thread Andreas Reichel
Good Morning David and All, thank you so much for your time and effort! I appreciate. At this point, I believe it is only MS Excel to blame for: On Sat, 2019-10-19 at 18:45 +0200, David Law wrote: > I think if you check the original XML of your *.xlsx, > you'll find that it contains something li

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> GNUMERIC vs LibreOffice vs Excel

2019-10-19 Thread Andreas Reichel
Guys, I am sorry: just one more for the fun. Opening the file in an XML Text Editor, I get 0.106691299. Opening the file in GNUMERIC, I get 0.106691299. (Both the shown cell content as well as the editable text box). Opening the file in LibreOffice, I get 0.1066913. (Same file, I

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> GNUMERIC vs LibreOffice vs Excel

2019-10-20 Thread Andreas Reichel
Dear All. with David's help I have been able to read that XLSX correctly and I will incorporate the following lines in SQLSHEET (XLSX JDBC driver) in order to avoid such problems in the future: // @author David Law private static final MathContext CTX_NN_15_EVEN = new MathContext(15, RoundingMod

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> GNUMERIC vs LibreOffice vs Excel

2019-10-20 Thread Andreas Reichel
at 07:13 +0700, Andreas Reichel wrote: > Dear All. > with David's help I have been able to read that XLSX correctly and > Iwill incorporate the following lines in SQLSHEET (XLSX JDBC driver) > inorder to avoid such problems in the future: > // @author David Law private static

Re: Floating Point Arithmetics, reading 0.1066913 gives 0.10669129999999999 --> GNUMERIC vs LibreOffice vs Excel

2019-10-21 Thread Andreas Reichel
Open > Source Offering.(but I did include a TODO that we needed to > understand Precision & Scale better) :-) > Best regards,DaveLaw > On 21/10/2019 02:13, Andreas Reichel wrote: > > Dear All. > > with David's help I have been able to read that XLSX correctly an

Re: POI 3.14 fails to read an excel file

2019-11-05 Thread Andreas Reichel
Sateesh, to me that sounds like a challenge with the Zip64. If my memory does not fail me, POI-3.18 has gotten a proper Zip64 implementation based on commons-compress with an important fix in POI 4.1.1. My recommendation is: try POI 4.1.1 first. There were so many API changes since 3.14 that usin

Re: Exception when moving from windows to linux

2020-02-18 Thread Andreas Reichel
Dear Matthias, please try to install the X Virtual Frame Buffer (XVFB) and start that in the background, before starting the Java VM. As far as I know, the Java VM needs a Graphic Device for all the AWT based operations, inclduing Fonts. Best regards Andreas On Wed, 2020-02-19 at 08:40 +0100, M

Re: Exception when moving from windows to linux

2020-02-18 Thread Andreas Reichel
124 } catch (IOException ex) { 125 Logger.getLogger(SwingUI.class.getName()).log(Level.SEVERE, null, ex); 126 } 127 } On Wed, 2020-02-19 at 14:43 +0700, Andreas Reichel wrote: > Dear Matthias, > please try to install the X Virtual Frame Buffer (XVFB) and start > thatin the backgro

Re: How to edit excel file with large data using SXSSF change cell color

2020-02-20 Thread Andreas Reichel
Greetings, in general 40'000 rows is a very small volume of data and I would not like to suggest employing Streaming in that case. Instead, you can hold 40'000 rows in a XSSF workbook easily if you just provide enough memory. Using a XSSF workbook, you can modify the content directly as you have t

Re: Using POI only as a formula evaluator

2020-02-27 Thread Andreas Reichel
Hi Philipp, we have done something similar, but we explicitely use a Excel Template: 1) create the Excel template with 2 areas: the parameter area and the formula/result area The advantage is, that you can test and visualize your calculations. 2) open the Excel template in Apache POI, fill the

Re: Using POI only as a formula evaluator

2020-02-28 Thread Andreas Reichel
Hi Philipp. On Fri, 2020-02-28 at 10:24 +0100, Philipp wrote: > thank you for the fast reply and your example. The calculation would > be > > done on a headless Server as a part of a webservice... Install XVFB for that purpose. > > Is there really no possibility to only use the formular evaluat

Re: SXSSF sheets and datavalidation

2020-05-15 Thread Andreas Reichel
Yoeri, my advise would be to create a XLSX file with your required constraints and to use it as a template, which you can open with the SXSSF API in order to fill it with data. Pay attention that you will be able to fill on NEW cells (but not to update/overwrite existing ones). You could either u

Re: SXSSF sheets and datavalidation

2020-05-18 Thread Andreas Reichel
r the thinking.Problem is that constraints are not static > so can't go with that approach. > Kind regards,Yoeri > > On 2020/05/16 06:29:58, Andreas Reichel < > andr...@manticore-projects.com> wrote: > > Yoeri, > > my advise would be to create a XLSX file wit

Re: Set up Constraint in Xlsx

2020-05-21 Thread Andreas Reichel
Rob, On Thu, 2020-05-21 at 19:39 -0600, Rob Sargent wrote: > I guess I don't understand what is not "good" about extra digits after > > the decimal point? Very simple, but frequent use case: Loading data from a Spreadsheet file into a database. In this case, the read value is a FLOAT which need

Re: Set up Constraint in Xlsx

2020-05-21 Thread Andreas Reichel
Marcin, On Thu, 2020-05-21 at 13:30 +, Marcin Wyrwalski wrote: > Hello. > > I would like to ask, if there is a possibility to set up constraint to not > allow user to write more than three decimall places in cell? I preparing and > sending file to user, and user is supposed to return file

Re: Perculiar problem reading validations from a XLSX exported from Google Sheets

2020-09-17 Thread Andreas Reichel
Stuart, maybe you could provide the simpliest possible test case, e. g. creating your form with only 2 columns and 1 row, add the validation and then: 1) extract the XML after your created the template 2) extract the XML after you have exporting it from Google spreadsheets 3) extract the XML afte

Re: Perculiar problem reading validations from a XLSX exported from Google Sheets

2020-09-17 Thread Andreas Reichel
On Thu, 2020-09-17 at 16:26 +0100, Stuart Owen wrote: > original - > https://github.com/stuzart/poi-google-export-testcase/blob/master/src/test/resources/original-unpacked/xl/worksheets/sheet1.xml#L17 > > exported - > https://github.com/stuzart/poi-google-export-testcase/blob/master/src/test/re

Re: Perculiar problem reading validations from a XLSX exported from Google Sheets

2020-09-17 Thread Andreas Reichel
Stuart, On Thu, 2020-09-17 at 17:07 +0100, Stuart Owen wrote: > > I'm not familiar with the format enough to know if this is legal or not. > > to add, I've tried validating the xml against its schema, and it appears > > to be legal. I do not doubt that. I would suspect that POI is falsely exp

Re: Rendering TeX formulas as equation objects in XLSX

2020-10-23 Thread Andreas Reichel
Cosimo, assuming you will need "streaming/SXSSF" solely for large data, but not because of many formulas, maybe you can: 1) first create a XSSF workbook and add your formula objects/pictures and save it and 2) then create a SXSSF from that XSSF template with the formula objects/pictures and fill

Re: Rendering TeX formulas as equation objects in XLSX

2020-10-23 Thread Andreas Reichel
Btw, there seems to be a stylesheet that translates MathML into OMML: https://github.com/python-openxml/python-docx/files/1453769/MML2OMML.zip And this shows how to use it:  https://stackoverflow.com/questions/46623554/add-latex-type-equation-in-word-docx-using-apache-poi Good luck! On Fri, 2020

Re: Rendering TeX formulas as equation objects in XLSX

2020-10-23 Thread Andreas Reichel
14:09, Cosimo wrote: > > On Fri, Oct 23, 2020, at 12:11, Andreas Reichel wrote: > > > > > And this shows how to use > > > it:  > > > https://stackoverflow.com/questions/46623554/add-latex-type-equation-in-word-docx-using-apache-poi > > > > Seems t

Re: Plea - test the POI 5.0.0 snapshot

2020-12-19 Thread Andreas Reichel
Good Morning Andreas and Team, thank you for the great work. We use POI 5 snapshot in our life environments for some time already (because we write very large files). Lots of different usecases: 1) reading from file into database 2) evaluating formulas 3) writing (formatted) reports 4) open the b

Re: [ANNOUNCE] Apache POI 5.0.0 released

2021-01-19 Thread Andreas Reichel
Congratulations and a big Thank You! This is a big and important release for us and we do appreciate your work! Thank you again and cheers! Andreas On Tue, 2021-01-19 at 20:52 +0100, Andreas Beeker wrote: > The Apache POI project is pleased to announce the release of POI > 5.0.0. > Featured are a

Re: Reading Massive Excel Files to csv

2021-05-03 Thread Andreas Reichel
Greetings. Please use the Excel Streaming Reader when reading large files: https://github.com/monitorjbl/excel-streaming-reader import com.monitorjbl.xlsx.StreamingReader; InputStream is = new FileInputStream(new File("/path/to/workbook.xlsx")); Workbook workbook = StreamingReader.builder()

Re: Reading Massive Excel Files to csv

2021-05-03 Thread Andreas Reichel
at 06:05 -0500, Oscar Bastidas wrote: > Awesome.  Thanks, I'll give this a try. > > Oscar > > Oscar Bastidas > Research Associate > University of Minnesota > > On Mon, May 3, 2021, 6:04 AM Andreas Reichel > > wrote: > > > Greetings. > > &

Re: Reading Massive Excel Files to csv

2021-05-03 Thread Andreas Reichel
hub code is finished?  I ask this because my only experience > with my > past work is where a file is read and held in memory at once and then > written to the file vs. the streaming technique.  Thanks again. > > Oscar > > Oscar Bastidas > Research Associate > University

Re: Reading Massive Excel Files to csv

2021-05-03 Thread Andreas Reichel
On Mon, 2021-05-03 at 12:16 +0100, Nick Burch wrote: > We have re-organised the svn area as part of our move to Gradle as > our > build system When I just started to move my stuff from ANT to Maven. Well done, Nick and Team :)

XSSFEvaluationWorkbook.getSheet can throw ArrayIndexOutOfBoundsException

2021-10-30 Thread Andreas Reichel
Greetings POI team. Using Apache POI 5.0 I would like evaluate all Cells in order to auto- size all columns in all sheets: FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); for (int i =0; i

Re: XSSFEvaluationWorkbook.getSheet can throw ArrayIndexOutOfBoundsException

2021-10-30 Thread Andreas Reichel
On Sat, 2021-10-30 at 11:42 +, PJ Fanning wrote: > Can you raise an issue and add a reproducible test case? Once we have > a reproducible test case, someone can have a look. Sure thing, thank you so much for prompt turn around. Have a great weekend. Andreas

Re: XSSFEvaluationWorkbook.getSheet can throw ArrayIndexOutOfBoundsException

2021-10-30 Thread Andreas Reichel
essage, but somehow it > > is not > > triggered. > > > > Can you create an issue and if possible share a sample workbook > > which > > shows this problem? > > > > Thanks... Dominik. > > > > On Sat, Oct 30, 2021 at 12:20 PM Andreas Reic

Re: XSSFEvaluationWorkbook.getSheet can throw ArrayIndexOutOfBoundsException

2021-10-30 Thread Andreas Reichel
Dominik and Team, I did my very best to create an isolated Test Case. The attached file does exactly what I do in the production (without database, formatting and less formulas). But for whatever reason it never triggers the Exception. The flow and the business logic is exactly the same. Only dif

Re: XSSFEvaluationWorkbook.getSheet can throw ArrayIndexOutOfBoundsException

2021-10-30 Thread Andreas Reichel
Greetings. On Sat, 2021-10-30 at 18:03 +0200, Dominik Stadler wrote: > If you use multi-threading in your big application, Nope, not within this particular Spreadsheet builder. >  you have to ensure that > a single Workbook is never used in multiple threads at the same time. Yes, am fully aware

Sheetnames no longer distinct, when adding one with more than 31 characters

2021-10-31 Thread Andreas Reichel
Greetings, maybe I hit another small glitch: 1) I have a long list of distinct Sheet Names, but some of them have more than 31 characters 2) when adding new sheets to the workbook, it looks like exceeding characters are cut of silently from the sheet name 3) thus failing, when cutting of the char

Re: XSSFEvaluationWorkbook.getSheet can throw ArrayIndexOutOfBoundsException

2021-10-31 Thread Andreas Reichel
On Sun, 2021-10-31 at 00:29 +0700, Andreas Reichel wrote: > but I still maintain my point, that I have added all > the sheets first before I evaluated anything. Dominik and Team, unfortunately I stand corrected: I ran this against large data many times since yesterday and have never bee

Re: Sheetnames no longer distinct, when adding one with more than 31 characters

2021-10-31 Thread Andreas Reichel
On Sun, 2021-10-31 at 09:31 +, PJ Fanning wrote: > Seems reasonable to me. An exception should only thrown if the > truncated name matches an existing sheet name. There you go: https://github.com/apache/poi/pull/273 Exceptions only on collisions, but I would like to warn at least when trimm

Re: Sheetnames no longer distinct, when adding one with more than 31 characters

2021-10-31 Thread Andreas Reichel
Greetings. On Sun, 2021-10-31 at 09:21 -0600, Rob Sargent wrote: > Is this really the answer?  Isn’t the 31 character constraint rather > archaic, even if long sheet names truly are counter-productive?  Why > “31”? This is not on POI, but solely Microsoft UI programming. As far as I understand, t

Running tests in parallel?

2021-11-01 Thread Andreas Reichel
Greetings. Pardon me to ask: Am I right that most of the Use Cases tests are executed serially (only)? Executing the tests seem to take surprisingly long time (8+ minutes?!) at almost no load on my cpu cores. If my observation was right: Is that intentional and why would we not run the tests in p

Re: Running tests in parallel?

2021-11-01 Thread Andreas Reichel
Dear All. On Mon, 2021-11-01 at 14:36 +0700, Andreas Reichel wrote: > Am I right that most of the Use Cases tests are executed serially > (only)? Looks like I was semi-right: // set heap size for the test JVM(s) minHeapSize = "128m" maxHeapSize = "1512m" // Speci

SpotBugs Violations

2021-11-02 Thread Andreas Reichel
Greetings. Fiddling around with the Gradle Build process, I spotted a lot of SpotBugs violations. While I am not a SpotBugs zealot (and usually would consider only of the most critical exceptions), I wonder: What are we doing with these exceptions? Please correct me if I am wrong: It looks like a

Re: SpotBugs Violations

2021-11-02 Thread Andreas Reichel
On Tue, 2021-11-02 at 12:00 +, PJ Fanning wrote: > Any volunteer who wants to sort it out so we have zero spotbugs > issues, code submissions are very welcome. Thanks for the heads up. Is there any agreement, which Top Prio Violations we care about and which one we would just ignore because

Re: Running tests in parallel?

2021-11-02 Thread Andreas Reichel
Dear All, I submitted  PR #275 which reduced the build time by est. 27%. Its a low hanging fruit, just using parallel building. However, I was not able to address the big elephant in the room: Gradle Build Caching. When activating it, the subproject `POI-OOXML-LITE` will fail on the task `generat

Re: Caching problems with Apache POI

2021-11-05 Thread Andreas Reichel
Simon, please state which version of POI you are using. I have experiences similar challenges in the past, Pre 5.0.0 when writing large data > 4GByte zipped. No issue with 5.0.0 though (it has been fixed in this version). If you use only small files, then we could rule out this issue.  Also, may

Re: SpotBugs Violations

2021-11-13 Thread Andreas Reichel
Greetings! On Tue, 2021-11-02 at 19:04 +0700, Andreas Reichel wrote: > Is there any agreement, which Top Prio Violations we care about and > which one we would just ignore because we are no zealots? I have sorted out all Prio 1 issues and set the Gradle Task to fail when any new Prio 1

Write NULL to cells, why not use setValue()?

2021-12-13 Thread Andreas Reichel
Compliments of the season, please allow me to ask: why exactly does the Cell interface define setValue(double value) instead of setValue(Double value) which would allow for setting NULL values? I understand, that I am supposed to use setBlank() instead but when you create very large Excel fil

Re: Write NULL to cells, why not use setValue()?

2021-12-14 Thread Andreas Reichel
ouble d) { >   if (d == null) { >     cell.setBlank(); >   } else { >     cell.setValue(d); >   } > } > > > > > > > On Tuesday 14 December 2021, 08:19:07 GMT+1, Andreas Reichel > wrote: > > > > > > Compliments of the season, > > please

Re: Write NULL to cells, why not use setValue()?

2021-12-14 Thread Andreas Reichel
Ok, got it. Thank you for the explanation, all the best Andreas

pjfanning/excel-streaming-reader: Gradle dynamic versioning breaks due to excel-streaming-reader:3.6.0-SNAPSHOT:20220228.103836-2

2022-02-28 Thread Andreas Reichel
Greetings. We use Gradle's dynamic version feature and define: // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml implementation 'org.apache.poi:poi-ooxml:5.+' // https://mvnrepository.com/artifact/com.github.pjfanning/excel-streaming-reader implement

Re: pjfanning/excel-streaming-reader: Gradle dynamic versioning breaks due to excel-streaming-reader:3.6.0-SNAPSHOT:20220228.103836-2

2022-02-28 Thread Andreas Reichel
Good Morning. On Tue, 2022-03-01 at 00:36 +, PJ Fanning wrote: > 1) excel-streaming-reader is not an Apache project - so discussion of > it here is not really correct Apologies, somehow I see them belonging to each other. > 2) why are you using a snaphot version of excel-streaming-reader? >

Re: [ANNOUNCE] Apache POI 5.2.2 released

2022-03-20 Thread Andreas Reichel
Thank you and kudos to all of you, great job as always. Cheers Andreas

Thread Safety of sheet operations

2022-05-16 Thread Andreas Reichel
Greetings! Of course I am fully aware that POI is not thread safety on workbook level and threads can only be used as long as every sheet is processed within its own thread (without altering styles). Still I ran into a small problem when processing several sheets in parallel: After creating all st

Re: Thread Safety of sheet operations

2022-05-19 Thread Andreas Reichel
Thank you for writing, Nick. On Thu, 2022-05-19 at 18:09 +0100, Nick Burch wrote: > On Mon, 16 May 2022, Andreas Reichel wrote: > > Of course I am fully aware that POI is not thread safety on > > workbook > > level and threads can only be used as long as every sheet is >

Re: Thread Safety of sheet operations

2022-05-19 Thread Andreas Reichel
On Thu, 2022-05-19 at 21:03 +0200, Dominik Stadler wrote: > I would be open to add some specific locks if it helps your case as > long as > we consider performance impact small. So if you send a PR and none of > the > active developers objects, we can see what we can do. Thanks a lot Dominik, this

Re: Multi-threading behavior

2022-05-21 Thread Andreas Reichel
One more thing: Swapping/Paging! The least thing you need to ensure is that you have enough RAM to hold your 10 WorkSheets in memory without paging/swapping involved. Depending on your workbook, that can be huge memory! As soon as swapping/paging kicks in, any performance measurement is useless b

Re: Multi-threading behavior

2022-05-21 Thread Andreas Reichel
Wabi, just guessing: XSSFWorkbook workbook = new XSSFWorkbook(new BufferedInputStream(new FileInputStream("src/main/resources/customer.xlsx"))); You operate with exactly ONE STATIC FILE and repeat that 10 times. I would not be surprised, when a recent JVM detects this and runs it only 1 time -

Re: [ANNOUNCE] Apache POI 5.2.3 released

2022-09-17 Thread Andreas Reichel
On Sat, 2022-09-17 at 10:52 +, PJ Fanning wrote: >  Support more Excel functions [#github- > 330,#58468,#66083,#66090,#66092,#66093,#66094,#66095,#66097,#66105] Greetings! Thank you for the amazing, great work! We do love POI. Question please: is there a list of "missing" Excel functions, we

Re: [ANNOUNCE] Apache POI 5.2.3 released

2022-09-17 Thread Andreas Reichel
Greetings. > To find which functions your copy of Apache POI supports, use > getSupportedFunctionNames() to get a list of the implemented function > names. For the list of functions that POI knows the name of, but > doesn't currently implement, use getNotSupportedFunctionNames() Awesome, exactly

Re: Batik 1.15 fixes some security issues

2022-09-22 Thread Andreas Reichel
Thanks for the heads up! I wished Apache FOP (or central apache) would be so alert. Much appreciated! Cheers Andreas On Thu, 2022-09-22 at 15:49 +, PJ Fanning wrote: > Hi everyone, > > Apache Batik [1] is used by Apache POI to work with SVG pictures that > can be embedded in Microsoft docu

Re: Batik 1.15 fixes some security issues

2022-09-22 Thread Andreas Reichel
Question please: as far as I can see it, Batik still pulls JAXEN/XercesImpl -- has this been taken care of? On Thu, 2022-09-22 at 23:15 +0700, Andreas Reichel wrote: > Thanks for the heads up! > I wished Apache FOP (or central apache) would be so alert. > > Much appreciated! > C

Re: Apache POI functionality breaks in JAVA 17

2023-01-05 Thread Andreas Reichel
Although there are some small API changes between 3.14 and 5.2.3, especially CellType and ENUM related. Nothing serious though, everything can be migrated within minutes. Cheers! On Thu, 2023-01-05 at 09:04 +, Nick Burch wrote: > On Thu, 5 Jan 2023, Dhaval Kaushik wrote: > > Also, this error

Re: Creating PDF from excel tables

2023-09-19 Thread Andreas Reichel
On Tue, 2023-09-19 at 12:12 +0200, Jakub Vojtíšek wrote: > Hi, > > I have a couple of general questions: > 1) Is there any plan or desire for POI to support exporting Excel > tables to > PDF? > 2) Do you know of any framework, preferably open source, using POI to > create PDF documents from excel

Re: Creating PDF from excel tables

2023-09-19 Thread Andreas Reichel
On Tue, 2023-09-19 at 12:12 +0200, Jakub Vojtíšek wrote: > Hi, > > I have a couple of general questions: > 1) Is there any plan or desire for POI to support exporting Excel > tables to > PDF? > 2) Do you know of any framework, preferably open source, using POI to > create PDF documents from excel

Re: Creating PDF from excel tables

2023-09-19 Thread Andreas Reichel
On Tue, 2023-09-19 at 13:58 +0200, Markus Kirsten wrote: > * Gotenberg, takes Excel files and produces PDFs in a stateless > Docker > container - https://gotenberg.dev/ Which seems to be LibreOffice packed into a container. Cheers Andreas

Re: Java 11 for POI 5?

2024-02-25 Thread Andreas Reichel
Greetings All! From our point of view the time of Java 8 is over: 1) more and more libraries and gradle plugins require Java 11 for the latest 2) POI 5 is at a very great spot, stable and robust with low(er) issue frequency compared to the years before So anyone who must stay with Java 8 can sta

Re: Java 11 for POI 5?

2024-02-29 Thread Andreas Reichel
On Thu, 2024-02-29 at 19:54 -0500, Marius Volkhart wrote: > where we don’t have a strong say in the runtime version. Important argument, we are in the same shoes! Cheers Andreas

Re: Difference Between Apache POI 3.17 and 4.0.0+ Versions Regarding Excel File Recognition on Slack

2024-09-05 Thread Andreas Reichel
On Thu, 2024-09-05 at 10:05 +0900, 노은석 wrote: > For your reference, the files were generated using SXSSFWorkbook Greetings. Recommendations: 1) verify, what the linux command "file" is telling you about your file 2) verify, that your speadsheet can be opened with Gnumeric, LibreOffice, MS Excel

ShiftRows, Bug in POI 3.10 Beta 2: "Could not find 'internal references' EXTERNALBOOK"

2014-02-07 Thread Andreas Reichel
Dear All, the method shift rows always fails for me: Exception in thread "main" java.lang.RuntimeException: Could not find 'internal references' EXTERNALBOOK at org.apache.poi.hssf.model.LinkTable.checkExternSheet(LinkTable.java:433) at org.apache.poi.hssf.model.InternalWorkbook.

Re: ShiftRows, Bug in POI 3.10 Beta 2: "Could not find 'internal references' EXTERNALBOOK"

2014-02-09 Thread Andreas Reichel
Thank you, Dominik. I filed https://issues.apache.org/bugzilla/show_bug.cgi?id=56123 accordingly. Best regards Andreas On Sun, 2014-02-09 at 10:04 +0100, Dominik Stadler wrote: > Please report a bug at > https://issues.apache.org/bugzilla/enter_bug.cgi?product=POI so we can > investigate. > > P

Re: AW: WYSIWYG-Editor, best format for storing text and using POI to change doc and ppt

2014-04-13 Thread Andreas Reichel
Heinz, I have no idea what you actually want to achieve as your English description is confusing indeed. (Your are welcome to send me an e-mail in plain German though). However, as far as I've got it, I would like to suggest to investigate into another direction: 1) write the text fragments in va

Re: Product of 199.1 and 38.15 gives 7595.664999999999

2014-08-20 Thread Andreas Reichel
Venkat, in my opinion you are just facing floating point arithmetics. The correct solution is in Java, not in POI. Please see below. Best regards Andreas public static void main(String args[]) { double c3 = 199.1; double c4 = 38.15; System.out.println(c3); System.out.println

Fun with XSSF Fill Colors

2015-02-21 Thread Andreas Reichel
Dear All. I built a java table component, which actually represents MS Excel files (as per HSSF or XSSF flavor). Unfortunately I spent hours for fiddeling around with simple cell background colors, as a simple XSSFCell xssfCell = (XSSFCell) cell; XSSFCellStyle xssfCellStyle = xssfCell.getCellStyl

Re: DateDif

2015-02-24 Thread Andreas Reichel
Dear All, as I was just working with time gaps, perhaps the following template might be helpful: private static int getTimeGap(Date d1, Date d2) { int tg = 0; int increment = d1.before(d2) ? 1 : -1; Calendar cal1 = GregorianCalendar.getInstance(); cal1.setT

Fun with XSSF Fill Colors

2015-03-03 Thread Andreas Reichel
Dear All. I built a java table component, which actually represents MS Excel files (as per HSSF or XSSF flavor). Unfortunately I spent hours for fiddeling around with simple cell background colors, as a simple XSSFCell xssfCell = (XSSFCell) cell; XSSFCellStyle xssfCellStyle = xssfCell.getCellStyl

Re: Fun with XSSF Fill Colors

2015-03-18 Thread Andreas Reichel
Dominik, thank you a lot, much appreciated. I will give it a try. For my own curiosity just a question please: My implicit work-around via fillID worked, so I wonder why there are two different ways for achieving the same even with inconsistent results. What I mean is: should the value of "applyFi

org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:543) --> Need book to evaluate name 'B65537'

2015-03-21 Thread Andreas Reichel
Dear All, inserting a lot of new rows into a XSSF Sheet works well up to row 65536, but finally fails: com.manticore.report.ExcelTools.shiftRows(ExcelTools.java:90): String oldFormula = oldCell.getCellFormula(); Ptg[] ptgs= FormulaParser.parse( oldFormula , parsingWorkbook , FormulaT

Re: org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:543) --> Need book to evaluate name 'B65537'

2015-03-21 Thread Andreas Reichel
ly fails on "=B65536+1"? Best regards Andreas On Sat, 2015-03-21 at 17:43 +, Nick Burch wrote: > On Sat, 21 Mar 2015, Andreas Reichel wrote: > > inserting a lot of new rows into a XSSF Sheet works well up to row > > 65536, but finally fails: > > > > com.m

Re: org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:543) --> Need book to evaluate name 'B65537'

2015-03-22 Thread Andreas Reichel
lized in the constructor with whatever you > provide as second parameter in FormulaParser.parse(), so it seems you > start passing in null here somehow... > > Dominik. > > On Sun, Mar 22, 2015 at 1:26 AM, Nick Burch wrote: > > On Sun, 22 Mar 2015, Andreas Reichel wrote: > >

Re: How to read 1 million rows in excel (.xlsx) format using Apache poi??

2015-07-02 Thread Andreas Reichel
-Xmx16G -Xms8G -Xss256k are your friends. Cheers. On Thu, 2015-07-02 at 02:00 -0700, karthikeyan S wrote: > i tried that Iterating but it only reading 5.5Lks rows only then it produce > > Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit > exceeded > at java.util.Ar

Re: POI not returning all rows

2016-08-17 Thread Andreas Reichel
Gregor, Rows and Cell are shown in Excel, even when not there (meaning Row==Null or Cell==Null). Your need to create a row first and the populate it with cells. Best regards On Wed, 2016-08-17 at 12:40 +0200, Gregor Kovač wrote: > Hi! > > I have an Excel file for which POI does not return all ro

Re: POI not returning all rows

2016-08-17 Thread Andreas Reichel
            e.printStackTrace();                 }             }         } On Wed, 2016-08-17 at 13:09 +0200, Gregor Kovač wrote: > Hi! > > > Can you please give me a corrected program that I sent in first e- mail? > > Best regards, > Kovi > > > 2016-08-17 12:47 GMT+02:00

Re: POI not returning all rows

2016-08-17 Thread Andreas Reichel
:) > > Best regards, > Kovi > > > 2016-08-17 13:13 GMT+02:00 Andreas Reichel : > > > Your program is correct! 19th row is in 20th line :) > > Line 20 has no row. Sheet.getRow(19)==null! Rows and Cell can be > > physically empty! > > > > try

POI-3.15: Commons-Collections-4 vs. Jasper Reports' dependency on Commons-Collections-3

2016-10-26 Thread Andreas Reichel
Dear Apache POI team, thank you very much for this great project. Recently I hit a caveat though: Sine POI 3.15 the software depends on commons-collections-4 (previously it depended on commons-collections-3 only). There is however another good software library "Jasper Reports", which still depe

Re: POI-3.15: Commons-Collections-4 vs. Jasper Reports' dependency on Commons-Collections-3

2016-10-26 Thread Andreas Reichel
On Wed, 2016-10-26 at 01:40 -0700, Javen O'Neal wrote: > The Commons collection project has namespaced their library so that > > collections3 and collections4 can run side by side.[1] Javen, thank you a lot. This saved my day! We put both libraries commons-collections-3.2.1.jar and commons-colle

Re: Export pdf-file from xssf-file with java

2016-12-10 Thread Andreas Reichel
the LibreOffice/OpenOffice Java Interface  http://api.libreoffice.org/examples/examples.html#Java_examples will be your best bet. Together with XVFB it will run also on headless servers. Cheers Andreas On Sat, 2016-12-10 at 13:44 +0100, Markus Christian wrote: > Hello there, > I am seaching for

Re: SQL syntax highlighting in .docx file

2017-03-03 Thread Andreas Reichel
On Fri, 2017-03-03 at 08:25 +, Peter Remec wrote: > I'm generating a .docx file using Apache POI. This file contains a lot of SQL > code and is quite unreadable so I was thinking about coloring that code. Any > idea how to achieve that? > > I understand that POI doesn't have some highlighte

Re: POI memory usage for 4MB exce file is high

2017-05-03 Thread Andreas Reichel
Mahmood, that was discussed many times already: XSSFWorkbook is a memory hog as it holds the whole information in a DOM tree with a lot of strings. (Does Java 8 String Deduplication help on that, when you have enough cores?) For cases like yours reading from a SXSSFWorkbook/stream will be more s

Re: Apache POI: Content Issue while processing huge excel file with SXSSF

2017-11-22 Thread Andreas Reichel
Thamodharam, we use Apache POI 3.18 development snapshot and have no problem to create SXSSF workbooks of 300 MByte, with up to 1 Mill. Rows and around 40 columns. On the server, that took up to 20 GB of RAM. However, we were never able to open such files with Libre Office, Gnumeric or Excel (whil

Re: Apache POI: Content Issue while processing huge excel file with SXSSF

2017-11-22 Thread Andreas Reichel
On Wed, 2017-11-22 at 19:39 +, Greg Woolsey wrote: > POI streaming may not catch it (it should, but maybe that's the bug), > but > > OOXML compliant apps (Excel, OpenOffice/LibreOffice, etc.) will > consider it > > corrupt. We have hit that limit and POI throws an exception (both in XSSF an

  1   2   >