RE: [poi] Column --> Autofit selection

2006-01-24 Thread Iain.Shepherd
The attachment got swallowed somewhere. I have pasted it at the end of this mail. Anthony As you requested. Hopefully it is clear enough... Usage 1. Create a separate AutoColumnSizer for each column on each sheet. 2. For each cell you add, call AutoColumnSizer.isNotificationRequired. 3. If that

RE: [poi] Column --> Autofit selection

2006-01-24 Thread Iain.Shepherd
Anthony As you requested. Hopefully it is clear enough... Usage 1. Create a separate AutoColumnSizer for each column on each sheet. 2. For each cell you add, call AutoColumnSizer.isNotificationRequired. 3. If that returns true, call AutoColumnSizer.notifyCellValue. ... 4. After all cells are adde

RE: [poi] Column --> Autofit selection

2006-01-19 Thread Iain.Shepherd
Thomas, I have actually written the code to do it using FontMetrics as Antony suggested. The performance hit is around 1 second on our hardware, I have a simple sampling algorithm so I only check cell widths on a sample of the rows (I check around 400 rows for a 65,536 row spreadsheet). Howeve

RE: HSSF Failure in IE

2005-12-15 Thread Iain.Shepherd
> This one sends back a 'redirect' to the browser, telling > it to fetch outputxls.xls or even > outputxls.xls?filename=myworksheet&extension=.xls as the > final result. An alternative I've used is to fetch a filename like: > output.xls.jsp?parameters According to some MS Knowledge Base artic

RE: POI & JAF?

2005-11-01 Thread Iain.Shepherd
Nah, I didn't want to do it that way (don't remember why), so I made my own implementation of DataSource instead. I didn't do any configuration other than putting the JARs on my classpath. Are you sending the XLS as the only part in the email? My code sends a text part first and the XLS as an att

RE: POI & JAF?

2005-10-28 Thread Iain.Shepherd
Andy, Just for my interest, what's Rosiretto? I only get one Google hit which is also you talking about it :o) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 28 October 2005 15:05 To: poi-user@jakarta.apache.org Subject: Re: POI & JAF? You may also want to

RE: POI & JAF?

2005-10-28 Thread Iain.Shepherd
Rob, Here is the code I use, which I think covers what you are talking about. Iain --- import javax.activation.DataHandler; import javax.activation.DataSource; DataSource dsData = new MemoryDataSource( poiByteArray, "foo.xls", "application/ms

RE: POI pivot tables

2005-08-01 Thread Iain.Shepherd
Ah thanks, I found your post now (9th July): > There are problems with > *reading* images in the 2.5 series. It writes them just fine, just > has issues reading them. Drop to 2.0.x. Shortly I'll add a "ignore > images" bit twiddle if no one beats me to it. In that post you were talking about

POI pivot tables

2005-08-01 Thread Iain.Shepherd
Hello all, Apologies, I know similar questions come up often. However I have looked in the archives and bugzilla, and I haven't found anything that seemed directly relevant. I was trying to open a (Excel 2002) XLS which contains a pivot table. I was hoping to just fill in data, and when I re-open

RE: Data range for charts

2005-07-27 Thread Iain.Shepherd
No problem Michael, > Can you please help me with some code snippets. I can get the range of > the named cells but can't seem to find how to modify this range and > assign it to the same name. Actually I never did this (changing a named range using POI). Here's the technique I used: 1. Create a

RE: hssfserializer gnumeric print information, zoom issue

2005-06-15 Thread Iain.Shepherd
[Guys - not sure if I'm off-topic here? Should I be discussing Cocoon HSSFSerializer on this list?] Asim, I haven't done much with the actual POI API so can't tell you how to make this exact change. If you're lucky it might be simple. You might just have to change the EPZoom class so that it mak

RE: hssfserializer gnumeric print information, zoom issue

2005-06-14 Thread Iain.Shepherd
Asim Haven't used these tags myself, but I've used and modified the HSSFSerializer quite a bit. Zoom is implemented but unused, comment 'This element is not used in HSSFSerializer 1.0'. http://www.docjar.com/docs/api/org/apache/cocoon/components/elementproce ssor/impl/poi/hssf/elements/EPZoom.htm

RE: AutoFilter in Excel

2005-06-09 Thread Iain.Shepherd
Thierry, see below. Thanks Iain Shepherd -Original Message- From: Avik Sengupta [mailto:[EMAIL PROTECTED] Sent: 22 November 2004 15:56 Subject: Re: HSSF - AutoFilter? Iain, Sorry, this feature doesn't exist as of now. We had at one point, some one willing to fund this, but that fell

RE: Opening HSSF Workbook in Excel

2005-02-15 Thread Iain.Shepherd
(Totally off the top of my head) could your browser have been making dodgy guesses at the filetype? I know I had a situation (in ASP) where naming my script 'renderjpeg.aspx' didn't work - correct MIME type notwithstanding - but 'renderjpeg.jpg.aspx' worked fine. So maybe you could've tried namin

RE: AW: Data range for charts

2005-01-13 Thread Iain.Shepherd
Nitin, Don't know if this helps (see below) Apols for the re-post (last time I tried the archives, they weren't working for me) Iain Shepherd -Original Message- From: Shepherd, Iain: IT (LDN) Sent: 07 January 2005 13:38 To: 'POI Users List' Subject: RE: Antwort: Re: HSSF - Changing c

RE: Antwort: Re: HSSF - Changing chart series size.

2005-01-07 Thread Iain.Shepherd
I had this problem last night, and just found a different solution: You can define the chart data as a reference to a named range. POI can't edit charts, but it can edit named ranges. I think. Going further, you can avoid editing the named range, if you define a named range for each column like t

RE: Content length issue

2004-11-19 Thread Iain.Shepherd
I've seen the two-dialog issue intermittently, serving .xls from Tomcat. By sniffing the HTTP traffic we determined that HTTP POST requests always caused the two-dialog issue for us; HTTP GET requests never did. I haven't looked at this since so I've no idea of the actual root cause, but I'd be v

HSSF - AutoFilter?

2004-11-18 Thread Iain.Shepherd
Hi all, We're evaluating HSSF. One requirement we have is to activate the Excel 'AutoFilter' feature, on a spreadsheet generated from scratch using HSSF. Does the API support this? Thanks Iain Shepherd Developer, GTCL Exception Management Barclays Capital, Canary Wharf, London, E14 4PU Tel: +44