Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing an application in C# that will send the
results to an Excel spreadsheet. The Excel spreadsheet will contain the tabulated results and charts. For one chart, there are four series. The chart type for the first series is Excel.XlChartType.xlColumnClustered. This is the one that I need to add the trendline to. I have seen some VB code that add the trend line as follows: Worksheets("sheet1").ChartObjects(1).Chart.SeriesC ollection (1).Trendlines.Add type:=xlLinear, name:="Linear Trend" I can't find the same Add function in C#. When I try to use the following code: Excel.Series oSeries = (Excel.Series) oChart.SeriesCollection(1); oSeries.Trendlines.Add(Excel.XlTrendlineType.xlPol ynomial, 2, null, null, null, null, null, null); I get the following compile error: 'Excel.Series.Trendlines(object)' denotes a 'method' which is not valid in the given context How do I add a trend line in C#? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change axes settings after adding trendline? | Charts and Charting in Excel | |||
Need help adding trendline to area chart | Charts and Charting in Excel | |||
Newbie query about adding trendline | Charts and Charting in Excel | |||
Adding Trendline To Just Some of the Bars in Chart | Charts and Charting in Excel | |||
Where is the "Chart Menu" for adding a trendline to a set of #s? | Charts and Charting in Excel |