Reply to topic  [ 6 posts ] 
next available row after adding chart to worksheet 
Author Message

Joined: Mon Jun 01, 2009 4:50 am
Posts: 5
Reply with quote
Post next available row after adding chart to worksheet
Hi, I need help with the following problem :
I need to add a chart to my WorkSheet. After the chart is generated, and added to the worksheet, how can I know which rows/columns are hidden behind this newly added chart ?
i.e. after adding the chart, I need to add more values to the rows that occur below the chart. So, how can I compute the next available row below my chart ?
Thanks in advance <- src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />


Mon Jun 01, 2009 4:52 am
Profile

Joined: Fri Feb 03, 2006 12:23 pm
Posts: 159
Location: Brasov, Romania
Reply with quote
Post 
You can use the
ExcelChart.easy_getSeriesAt(index)
method to extract the series and
ExcelSeries.getValues() to see the row and columns behind the chart data.


Mon Jun 01, 2009 7:22 am
Profile WWW

Joined: Fri Feb 03, 2006 12:23 pm
Posts: 159
Location: Brasov, Romania
Reply with quote
Post 
If you want the chart position in the spreadsheet, you can set the size of the chart, so the chart will be always in the same position.
ExcelChart.setSize(int chartWidth, int chartHeight)
ExcelChart.setLeftUpperCorner(int row, int column)


Mon Jun 01, 2009 7:25 am
Profile WWW

Joined: Mon Jun 01, 2009 4:50 am
Posts: 5
Reply with quote
Post 
thanks Daniela !
but, let me rephrase my question :
I meant : is there any way of knowing the lower right corner (row & col) of the chart that I add to the worksheet ?


Tue Jun 02, 2009 1:20 am
Profile

Joined: Fri Feb 03, 2006 12:23 pm
Posts: 159
Location: Brasov, Romania
Reply with quote
Post 
If you know/set the chart size, you can calculate the lower row. The default row height is 17.
For the columns is more complicated. By default, the column width is adjusted to cell data content, so the column width is not fixed. But if you will set the column width for all columns, you can calculate the last column.


Tue Jun 02, 2009 5:13 am
Profile WWW

Joined: Mon Jun 01, 2009 4:50 am
Posts: 5
Reply with quote
Post 
thanks Daniela !! <- src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />
that should solve my problem.


Tue Jun 02, 2009 5:40 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.