Should I generate a style for each cell?

2011-09-25 Thread Jim Talbut
Hi, The POI documentation makes it clear that fonts should not be generated for each cell, but doesn't say anything about styles. Is there anything stopping me from generating a new style for each cell? Is doing so inefficient? Thanks Jim -

Problems adding pictures to an XLSX sheet

2011-09-27 Thread Jim Talbut
Hi, I'm adding three pictures to an XLSX sheet and the result is rather odd - the pictures all look correct in Excel, but when I try to move one of them (in Excel) it moves the wrong picture. i.e. I drag Picture 3 to a new location and Picture 1 appears there at Pictures 3's size. Is this so

Re: Problems adding pictures to an XLSX sheet

2011-09-27 Thread Jim Talbut
On 27/09/2011 11:14, Jim Talbut wrote: Hi, I'm adding three pictures to an XLSX sheet and the result is rather odd - the pictures all look correct in Excel, but when I try to move one of them (in Excel) it moves the wrong picture. i.e. I drag Picture 3 to a new location and Picture 1 ap

Re: Problems adding pictures to an XLSX sheet

2011-09-28 Thread Jim Talbut
On 27/09/2011 21:52, Jim Talbut wrote: On 27/09/2011 11:14, Jim Talbut wrote: Hi, I'm adding three pictures to an XLSX sheet and the result is rather odd - the pictures all look correct in Excel, but when I try to move one of them (in Excel) it moves the wrong picture. i.e. I drag Pict

XSSFWorkbook.write(OutputStream) closes the stream

2011-10-04 Thread Jim Talbut
Hi, XSSFWorkbook.write(OutputStream) closes the stream, whilst HSSFWorkbook.write(OutputStream) doesn't. Is this intentional? Unavoidable because of third party libraries? Thanks. Jim - To unsubscribe, e-mail: user-unsubsc

Re: XSSFWorkbook.write(OutputStream) closes the stream

2011-10-05 Thread Jim Talbut
On 05/10/2011 11:32, Yegor Kozlov wrote: It is a feature of the OpenXml4J library. XSSFWorkbook.write builds the model and delegates actual saving to OPCPackage.save(OutputStream) where the initial stream is wrapped with ZipOutputStream: ZipOutputStream zos = new ZipOutputStream(outputStream);

ClientAnchor Dx/Dy behaviour in HSSF and XSSF (POI 3.8b4)

2011-10-06 Thread Jim Talbut
Hi, I've finally got my images sized correctly in both HSSF and XSSF with POI 3.8 beta 4 and I'd be grateful if someone would confirm the behaviour I've found. For HSSF the Dx and Dy values are based on fractions of a cell width/height, ranging from 0 to 1024/255. For XSSF the Dx and Dy valu

Re: ClientAnchor Dx/Dy behaviour in HSSF and XSSF (POI 3.8b4)

2011-10-08 Thread Jim Talbut
On 07/10/2011 13:02, Yegor Kozlov wrote: Something to improve for 3.8-FINAL. You are very much welcome to post the corrected javadoc for ClientAnchor:) I wrote a blog (which noone reads :-) ) on it: http://www.spudsoft.co.uk/?p=439 You are welcome to take anything from there if you want (includi

SheetUtil.getColumnWidth

2011-11-23 Thread Jim Talbut
Hi, Could I make a request for a small change to SheetUtil.getColumnWidth? Headers rows in a sheet often contain titles that are expected to run over into subsequent columns, so I'd like to be able to ignore some rows at the start. Measuring every single cell can be prohibitively expensive for

Re: SheetUtil.getColumnWidth

2011-11-28 Thread Jim Talbut
On 25/11/2011 22:10, Nick Burch wrote: On Wed, 23 Nov 2011, Jim Talbut wrote: Could I make a request for a small change to SheetUtil.getColumnWidth? Headers rows in a sheet often contain titles that are expected to run over into subsequent columns, so I'd like to be able to ignore some

XSSF setBorder** slow

2011-12-06 Thread Jim Talbut
Hi, I'm trying to optimise my POI-calling code and jProfiler is telling me that adding borders to styles is quite a few orders of magnitude slower than setting other properties on a style. i.e.: XSSFCellStyle.setBottomBorderColor - Calls: 6, Total time 141ms. XSSFCellStyle.setFont - Calls: 14,

HSLF: addPictures/Fills not working correctly

2011-12-07 Thread Jim Talbut
Hi, If org.apache.poi.hslf.model.TestBackground.testBackgroundPicture is modified to write to a file, instead of a byte array: //serialize and read again // ByteArrayOutputStream out = new ByteArrayOutputStream(); FileOutputStream out = new FileOutputStream( "C:\\Temp\\

Re: HSLF: addPictures/Fills not working correctly

2011-12-08 Thread Jim Talbut
at PowerPoint add an EscherTertiaryOptRecord to the background, and POI has fill.rectright and fill.rectbottom properties. If anyone more knowledgeable could take a look I'd be happy to make all this available. Jim On 07/12/2011 19:43, J

Re: HSLF: addPictures/Fills not working correctly

2011-12-08 Thread Jim Talbut
the thing that made it work: Change the ref count in the BSE record to 1 (done with a hex editor so far). More investigation needed, but got to cook the dinner now! Jim On 08/12/2011 14:49, Jim Talbut wrote: I've been trying to work out why the backgrounds aren't working, but

Re: HSLF: addPictures/Fills not working correctly

2011-12-08 Thread Jim Talbut
Patch submitted to https://issues.apache.org/bugzilla/show_bug.cgi?id=46288 Whilst the two changes I made to the tag and the hash make the document consistent with other PPTs they don't seem to be necessary so I haven't included them in the patch. Jim On 08/12/2011 18:07, Jim Ta

Problems inserting RichText in SXSSF worksheet

2011-12-09 Thread Jim Talbut
Hi, Are there any known issues with inserting RichText cells in an SXSSF worksheet? I've just tried to change a working system using XSSF to use SXSSF and hit two problems: 1. Any RichText cells have lost their richness (everything comes out in one font). 2. I insert images after processing

Re: SXSSF Writing - Memory issues

2012-01-21 Thread Jim Talbut
On 20/01/2012 22:39, Matt Rogghe wrote: Howdy all, Looking simply for any tips when writing huge workbooks using the SXSSFWorkbook implementation. I'm pulling data from a database and writing out a workbook. In this particular case I'm writing upwards of 3+ million rows across 5 sheets. Us

Re: Read xlsx file that comes from Apache in Excel 2003

2012-01-27 Thread Jim Talbut
On 27/01/2012 08:57, lepolochon wrote: HI, I do not have test yet the tool you adviced med, but I have tested my program and the problem clearly comes from the insertion of pictures. As soon as I insert a picture, the xlsx file does not work on Excel 2003, but works great on Excel 2010... Paul

Re: Stream xssf cell by cell?

2012-02-07 Thread Jim Talbut
On 07/02/2012 15:49, colossus wrote: Hello, I have a huge amount of data which I would like to stream row by row. I thought calling workbook.write(stream) after changing the value of each row would append each write onto the output stream, but I was wrong. As it is, the file size suggests/matche

Excel date formats

2012-03-15 Thread Jim Talbut
Hi, Is there a function (or does anyone have one that they are prepared to share) for converting Java data formats into Excel? I need to be able to convert DEFAULT, SHORT, MEDIUM, LONG to formats that work in Excel for any locale. At the moment I am doing this: private void dumpSingleDat

Re: Excel date formats

2012-03-16 Thread Jim Talbut
Oh stupid me, now I see what I was missing - all my months and days are in English and I'm too blinkered to have noticed! Doh! OK, so that locale prefix then... On 15/03/2012 19:21, Jim Talbut wrote: Yegor, You are right about toLocalizedPattern(), I got nowhere with that. But

Re: Excel date formats

2012-03-16 Thread Jim Talbut
true, DateFormat.MEDIUM, "Medium" ); outputLocaleDataFormats(date, false, true, DateFormat.LONG, "Long" ); outputLocaleDataFormats(date, false, true, DateFormat.FULL, "Full" ); } On 16/03/2012 08:44, Jim Talbut wrote: Oh stupid me, now I see

Re: where can i get the jar files so that i can read xlsx excel files

2013-01-29 Thread Jim Talbut
On 29/01/2013 15:33, Nick Burch wrote: On Tue, 29 Jan 2013, bhavinragha wrote: thanks nick, but im still very confused. i am very new to java, im using netbeans. You probably want to read some tutorials on java development with netbeans, then review the list archive - there was discussions rec

Re: Apache POI- SXSSFWorkbook - Block a row from flushing

2013-05-17 Thread Jim Talbut
On 17 May 2013, at 15:51, Nick Burch wrote: > On Fri, 17 May 2013, Raja Garlapati wrote: >> Questions: 1. can i block any row from flushing? 2. Any solution you can >> think of? > > No. SXSSF is append-only. Once a row is outside the buffer, that's it, it > gets written to disk. Other rows have

Re: problem running on the mainframe

2013-06-14 Thread Jim Talbut
On 12/06/2013 21:35, carl sandburg wrote: Has anybody tried running a java program that uses POI on a mainframe in batch under UNIX System Services? We are having a problem creating a "large" spreadsheet - about 130k rows - the job goes well for about 30k records, then starts swapping out, then

XSSFSheet.setRepeatingRows not working

2013-07-08 Thread Jim Talbut
Hi, Using POI 3.9. If I call XSSFSheet.setRepeatingColumns it works as expected, but if I call XSSFSheet.setRepeatingRows it seems to break the sheet: when I attempt to do Print Preview it comes up with "Print preview is not available" and the Page Layout -> Print Titles dialog doesn't display

Is anyone working on bar charts for XSSF?

2014-02-20 Thread Jim Talbut
Hi, Is anyone working on bar charts for POI output to XLSX? How much work is it to get them in (to a basic level)? Thanks Jim - To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...

Re: Is anyone working on bar charts for XSSF?

2014-02-21 Thread Jim Talbut
t, DaveLaw On 20/02/2014 20:18, Jim Talbut wrote: Hi, Is anyone working on bar charts for POI output to XLSX? How much work is it to get them in (to a basic level)? Thanks Jim - To unsubscribe, e-mail: user-unsubscr...@

Re: POI Memory issue

2015-03-21 Thread Jim Talbut
Hi Carlos, One technique that might help for you is to separate the pivot table work from the output of the data. Create the pivot table up front (ideally using Excel, but with POI if you have to) using an input sheet that has the structure of your final data but that only contains two rows (h

Updating charts, especially embedded in PowerPoint

2017-02-15 Thread Jim Talbut
Hi, I'd like to be able to update the data behind charts both in XLSX files and PPTX files. I've reached the point where I can change the data for both types of file (ZipFileInputSteam replacing the embedded Excel workbook with an updated one), but this isn't reflected in charts. It seems