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 spreadsheet, in Excel, with a named range for each column
you will use.
like this: 
  DataA:  =OFFSET(Sheet1!$A$1,1,0,COUNTA(Sheet1!$A:$A)-1)

2. Create a chart.

3. Go to the chart 'Source Data' dialog, Series tab.
Select the first series. Set 'Values' to:
  =Book1!DataA
Repeat for every other series.

4. Try adding data to the sheet.
You should find the graph automatically expands as you add data.

5. Save this workbook.
(See example attached)

So all you have to do with POI is a. load this workbook, b. fill in the
real data.

Hope that makes sense.

Iain




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: 26 July 2005 19:46
To: Shepherd, Iain: IT (LDN)
Subject: Data range for charts


Iain,
I've seen your replies back in January this year regarding this subject
on
                               
                               
   gmane.comp.jakarta.poi.use  
   r                           
                               
                               

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. Please let me know if you can help. Thank
you, Michael Dolgonos



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------

Attachment: example.xls
Description: example.xls

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to