If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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); |
Thread Tools | |
Display Modes | |
|
|