Re: emulate saveAs

2018-11-12 Thread Rob Sargent
:34 Andreas Beeker >> Hi Rob, >> >> although this is more memory consuming, how about opening your template >> file via (File-)InputStream and using Workbook.write(new >> FileOutputStream(..))? >> >> Andi >> >> On 12.11.18 22:25, Rob Sarge

emulate saveAs

2018-11-12 Thread Rob Sargent
How does one read in an excel file then "save as" new file? I'm transforming xlsx input to a very different xlsx output. I open the original, do my work in a new sheet, then save to a new file.  Unfortunately, if the original is writable by me, then my new sheet gets saved in the original

setting style on new sheet, getting grief

2018-12-20 Thread Rob Sargent
I'm using 4.0.1 as of this morning hoping this would help.  I have recently begun to get: Exception in thread "main" java.lang.IllegalArgumentException: This Style does not belong to the supplied Workbook Styles Source. Are you trying to assign a style from one workbook to the cell of

Re: error setting style

2018-12-20 Thread Rob Sargent
across Workbook instances. See this thread[1] for a description of why, and what to do instead when you need to copy a style between workbooks. Greg [1] https://stackoverflow.com/questions/10773961/apache-poi-apply-one-style-to-different-workbooks On Thu, Dec 20, 2018 at 11:58 AM Rob Sargent wrote

error setting style

2018-12-20 Thread Rob Sargent
I'm using 4.0.1 as of this morning hoping this would help.  I have recently begun to get: Exception in thread "main" java.lang.IllegalArgumentException: This Style does not belong to the supplied Workbook Styles Source. Are you trying to assign a style from one workbook to the cell of

Re: error setting style

2018-12-20 Thread Rob Sargent
that also manipulates styles and adds/removes cells, I'm interested to see if a bug was introduced or documentation needs improving, or perhaps some internal API is exposed without proper documentation or safety checks. Greg On Thu, Dec 20, 2018 at 3:05 PM Rob Sargent wrote: I have circumvented the

Re: error setting style

2018-12-21 Thread Rob Sargent
de that also manipulates styles and adds/removes cells, I'm interested to see if a bug was introduced or documentation needs improving, or perhaps some internal API is exposed without proper documentation or safety checks. Greg On Thu, Dec 20, 2018 at 3:05 PM Rob Sargent wrote: I have circu

Re: How display text fits with the width of column?

2018-12-01 Thread Rob Sargent
You can autoResize the column > On Nov 28, 2018, at 7:56 PM, paoim101084 wrote: > > In Power point, I have a table with 4 rows and 6 columns. > For example: > ID, Name, Description, Price, Percent, Current Value > 123,Car, It is new car in 2019, $4, 88%, $38000 > > How to make text fit to

Re: How display text fits with the width of column?

2018-11-29 Thread Rob Sargent
Getting the length in mm of a string is tricky. Type face and font size etc come into play. Better off producing the one line you describe then in PP adjust the widths off the columns to what looks best. Record the widths and use in your code. > On Nov 28, 2018, at 7:56 PM, paoim101084

question on row.shiftCellsRight method

2019-01-11 Thread Rob Sargent
Does this in effect increase the number of columns in the row (by step value) or do the cells in the shifted range replace/over-write any cells already in the target range? I really just need the values to move within a fixed number of columns.  I'm sorting-while-adding groups of cells within

Re: Is there any alternative way to cell style for all cells in a row, instead of setting it Cell by Cell

2019-01-25 Thread Rob Sargent
Define your styles up front, apply the correct style when you make the cell. On 1/24/19 4:47 AM, Venkata Sagar Varma Muppala wrote: Hi, As part of our project, we have to build an excel report, which will have thousands of rows and columns. in this many of the cells in each row will have

Re: out of memory error when creating pptx file

2020-02-03 Thread Rob Sargent
Since no one really wants to sit through 600 slides, break the total up in “chapters” and see where that gets you? How much memory does you machine have, which version of java are you using. > On Feb 3, 2020, at 7:15 AM, jaehoon jeong wrote: > > Hello > > I'm trying to generate a pptx file

Re: out of memory error when creating pptx file

2020-02-03 Thread Rob Sargent
ch hundred slides would be to write a new workbook.  You would then have to merge those into a single workbook via poi unless you are prepared to merge the underlying xml files? That approach would certainly be more memory efficient but more a xerces problem than a poi problem. On 2020/02/03 14:

Re: out of memory error when creating pptx file

2020-02-04 Thread Rob Sargent
ces merge individual pptx files without consuming too much memory? Xerces is an XML tool. Perhaps you can stream edit a template to generate the final show. >> On 2020/02/04 02:30:43, Rob Sargent wrote: >> >> >>> On 2/3/20 7:20 PM, jaehoon jeong wrote: >>> Tha

Re: Set up Constraint in Xlsx

2020-05-21 Thread Rob Sargent
I guess I don't understand what is not "good" about extra digits after the decimal point? You can round to whatever precision you choose. What if the user is using some tool to generate and insert the data and it divides 1 by 3 and gets 0.33. You're going to make the user trim that

Re: Appending sheets to xlsx memory issues.

2021-08-06 Thread Rob Sargent
> On Aug 6, 2021, at 3:44 AM, Moditha Hewasinghage > wrote: > > Hi everyone, > > I am trying to append a sheet into an existing xlsx and encountering memory > issues. However, If I do not open an existing xlsx I can write far bigger > files. I have an example code snippet here: > >

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

2021-10-31 Thread Rob Sargent
> On Oct 31, 2021, at 8:39 AM, Andreas Reichel > wrote: > > > > 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

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

2021-10-31 Thread Rob Sargent
> On Oct 31, 2021, at 10:27 AM, Andreas Reichel > wrote: > > 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 ar

Re: Creating Table of Contents

2022-06-22 Thread Rob Sargent
On 6/22/22 07:41, PJ Fanning wrote: I have never come across anyone using POI and docx4j together. Maybe you would be better off using stackoverflow.com and providing a reproducible use case. A larger number of developers can be reached there. On Tuesday 21 June 2022, 08:56:51 IST,

Re: Issue with 5.2.3

2022-10-31 Thread Rob Sargent
On 10/31/22 10:10, Campbell, Lance wrote: I just started working with POI. . I am just writing out an Excel document. I pulled down the project using Maven for 5.2.3 . In eclipse everything compiled fine. When I deployed the software to Tomcat I got this error message: Exception in thread