You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Istvan Szilagyi <is...@information-factory.com> on 2003/08/06 12:56:18 UTC

Re: chart support in HSSF (adding chart with macro?)

Unfortunatly the excel file structure is dynamic,and I don't know where is
the  "datasource" for the chart.

In this case I can't use "template" excel files already prepared with chart.
It would also be enough if I coud write a macro to the excel (also from
java)
for ex:
Sub chart1()
    Charts.Add
    ActiveChart.ChartType = xlColumnClustered
    ActiveChart.SetSourceData
Source:=Sheets("multichoice").Range("DYNAMIC"), _
        PlotBy:=xlRows
    ActiveChart.Location Where:=xlLocationAsObject, Name:="charts"
End Sub

and here I can have (from java) the correct range.
Can a macro be added and  if yes how to the workbook?

Istvan

----- Original Message -----
From: <ma...@jpmorgan.com>
To: <po...@jakarta.apache.org>
Cc: <po...@jakarta.apache.org>
Sent: Wednesday, August 06, 2003 9:42 AM
Subject: Re: chart support in HSSF


>
> as with many 'advanced' features of excel - i think the best path is
> 'templates' - build up your charts/pivot reports (they work fairly well)
in
> excel, and just use poi to 'fill-in' the data
>
>
>
> |---------+--------------------------------------->
> |         |           istvan.szilagyi@information-|
> |         |           factory.com                 |
> |         |                                       |
> |         |           06/08/03 08:13              |
> |         |           Please respond to poi-user  |
> |         |                                       |
> |---------+--------------------------------------->
>
>---------------------------------------------------------------------------
--------------------------------------------------|
>   |
|
>   |       To:       poi-user@jakarta.apache.org
|
>   |       cc:
       |
>   |       Subject:  Re: chart support in HSSF
|
>
>---------------------------------------------------------------------------
--------------------------------------------------|
>
>
>
>
> found the method
> class HSSFChart.createBarChart
> public void createBarChart(HSSFWorkbook workbook,
>                            HSSFSheet sheet)
>   Creates a bar chart. API needs some work. :)
>   NOTE: Does not yet work... checking it in just so others can take a
look.
>
> so seems to be I have to wait for it...
>
>
>
> ----- Original Message -----
>
> From: "Istvan Szilagyi" <is...@information-factory.com>
> To: <po...@jakarta.apache.org>
> Sent: Wednesday, August 06, 2003 8:58 AM
> Subject: chart support in HSSF
>
>
> Hi,
>
> Does enyone know it there is a minimal Bar Chart support in HSSF,
> The POI  version which I'm testing is poi-2.0-pre3-20030728.jar,
> It's working nice (the Excel part) even using Excel2002 SP-1
>
> When yes where can I find a short example (of generating Bar Chart)
> If no ....
>
> Cheers,
> Istvan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>
>
>
>
>
> This communication is for informational purposes only.  It is not intended
as
> an offer or solicitation for the purchase or sale of any financial
instrument
> or as an official confirmation of any transaction. All market prices, data
> and other information are not warranted as to completeness or accuracy and
> are subject to change without notice. Any comments or statements made
herein
> do not necessarily reflect those of J.P. Morgan Chase & Co., its
> subsidiaries and affiliates.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


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