Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Excel
123quattro
charting
crashesgpfs
datamap
excel
interopoledde
links
misc
newusers
printing
programming
querydao
sdk
setup
templates
worksheet.functions
  
 
date: Fri, 7 Dec 2007 02:17:55 -0800 (PST),    group: microsoft.public.excel.interopoledde        back       


c# Select existing Chart   
I am using C# to take data from a database and place in an Excel 2003
spreadsheet.   Depending on the user query the data can be anything
from a few rows to 1000 rows.

The Excel 2003 sheet is a template with 4 existing Charts.  The charts
are formated with different colors and sizes etc.  I want to select
each chart in turn and adjust the source data and series data to match
the number of rows.

I am having trouble setting the chart object to the first chart.

If I was doing this in a VBA macro the code would look like
   ActiveSheet.ChartObjects("Chart 1").Activate

I am trying to use syntax like

XL.Chart xlChart = (XL.Chart)wb.Charts.Select("Chart 1");

Any Suggestions ?


Thanks
Damian
date: Fri, 7 Dec 2007 02:17:55 -0800 (PST)   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us