View unanswered posts | View active topics
It is currently Thu Nov 21, 2024 7:47 am
|
Page 1 of 1
|
[ 6 posts ] |
|
next available row after adding chart to worksheet
Author |
Message |
apple
Joined: Mon Jun 01, 2009 4:50 am Posts: 5
|
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 |
|
|
daniela
Joined: Fri Feb 03, 2006 12:23 pm Posts: 199 Location: Brasov, Romania
|
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 |
|
|
daniela
Joined: Fri Feb 03, 2006 12:23 pm Posts: 199 Location: Brasov, Romania
|
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 |
|
|
apple
Joined: Mon Jun 01, 2009 4:50 am Posts: 5
|
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 |
|
|
daniela
Joined: Fri Feb 03, 2006 12:23 pm Posts: 199 Location: Brasov, Romania
|
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 |
|
|
apple
Joined: Mon Jun 01, 2009 4:50 am Posts: 5
|
thanks Daniela !! <- src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />
that should solve my problem.
|
Tue Jun 02, 2009 5:40 am |
|
|
|
Page 1 of 1
|
[ 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
|
|