Creating Excel chart sheet using C#
Hello,
I'm writing a tool using VS 2005 SP1 (C#) which processes some survey data
within Excel (2007). And have gotten the point where I need to create a chart
displaying some results. However, when executing the 2nd line of code below.
I get "Exception from HRESULT: 0x800A03EC." After lots of searching , etc, I
haven't been able to narrow down a cause. Any ideas?
Chart ch = (Chart)wb.Charts.Add(Type.Missing, (Worksheet)wb.Worksheets[1],
1, Microsoft.Office.Interop.Excel.XlChartType.xlXYSca tter);
ch.SetSourceData(ws3.get_Range("J2:K38",Type.Missi ng),
Microsoft.Office.Interop.Excel.XlRowCol.xlRows);
|