Home
Forums
New posts
Search forums
Online Courses
2022 Rankings
2022 MFE Programs Rankings Methodology
Reviews
Latest reviews
Search resources
Tracker
What's new
New posts
New media
New media comments
New resources
New profile posts
Latest activity
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
C++ Programming for Financial Engineering
Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering.
Learn more
Join!
Python for Finance with Intro to Data Science
Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job.
Learn more
Join!
An Intuition-Based Options Primer for FE
Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models.
Learn more
Join!
Home
Forums
Quant discussion
Computing
Excel interop The server threw an exception. (Exception from HRESULT: 0x80010105 (charting in excel)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Daniel Duffy" data-source="post: 35349" data-attributes="member: 607"><p>I think you are using .NET 3.0 which does not support optional parameters. Use MISSING parameter as the test case here shows. Furthermore, you need to cast the C# 'Object' to the correct type.</p><p> </p><p>BTW you don't need COM explicitly because .NET wrappers are created automatically. In that sense Excel integration is a lot easier than before.</p><p> </p><p><a href="http://www.datasimfinancial.com/forum/viewtopic.php?t=20" target="_blank">http://www.datasimfinancial.com/forum/viewtopic.php?t=20</a></p><p> </p><p> </p><p> </p><p>I</p><p> </p><p>Excel.ChartObjects xlCharts = (Excel.ChartObjects)getWorkSheet(4).ChartObjects(misValue);</p><p> </p><p>Excel.ChartObject myChart = (Excel.ChartObject)xlCharts.Add(10,80,300,250); <-------- Exception thrown here</p><p> </p><p> </p><p> </p><p>II</p><p> </p><p><span style="font-size: 10px">ch.ChartWizard(ws.get_Range(String.Format("A1:B{0}", i), Type.Missing), Excel.XlChartType.xlCylinderCol, 1,</span></p><p><span style="font-size: 10px">Excel.XlRowCol.xlColumns, 1, 0, true, "Chart with values of each row",</span></p><p><span style="font-size: 10px">"Rows", "Value", "Extra Title");</span></p><p> </p><p><span style="font-size: 10px">// Create chart on same worksheet and format the chart using the chart wizard.</span></p><p><span style="font-size: 10px">ch=(ws.ChartObjects(Type.Missing) as Excel.ChartObjects).Add(150, 0, 400, 400).Chart;</span></p></blockquote><p></p>
[QUOTE="Daniel Duffy, post: 35349, member: 607"] I think you are using .NET 3.0 which does not support optional parameters. Use MISSING parameter as the test case here shows. Furthermore, you need to cast the C# 'Object' to the correct type. BTW you don't need COM explicitly because .NET wrappers are created automatically. In that sense Excel integration is a lot easier than before. [URL]http://www.datasimfinancial.com/forum/viewtopic.php?t=20[/URL] I Excel.ChartObjects xlCharts = (Excel.ChartObjects)getWorkSheet(4).ChartObjects(misValue); Excel.ChartObject myChart = (Excel.ChartObject)xlCharts.Add(10,80,300,250); <-------- Exception thrown here II [SIZE=2]ch.ChartWizard(ws.get_Range(String.Format("A1:B{0}", i), Type.Missing), Excel.XlChartType.xlCylinderCol, 1,[/SIZE] [SIZE=2]Excel.XlRowCol.xlColumns, 1, 0, true, "Chart with values of each row",[/SIZE] [SIZE=2]"Rows", "Value", "Extra Title");[/SIZE] [SIZE=2]// Create chart on same worksheet and format the chart using the chart wizard.[/SIZE] [SIZE=2]ch=(ws.ChartObjects(Type.Missing) as Excel.ChartObjects).Add(150, 0, 400, 400).Chart;[/SIZE] [/QUOTE]
Verification
Post reply
Home
Forums
Quant discussion
Computing
Excel interop The server threw an exception. (Exception from HRESULT: 0x80010105 (charting in excel)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top