I may seem a little Bullish on .NET, but I was able to create this application fairly quickly in C# thanks to the rich library and ease of connecting to COM applications like Excel. Those of you who are Visual C++ programmers will be greatly relieved that it is finally as easy as using Visual Basic to talk to the COM interfaces of applications and ActiveX controls in C#. This article is based upon the code and article written by Dipal Choksi. You may want to refer to this article to see how the stock quotes are captured from the web. I've added the port of the quotes to Excel as well as a timer that retrieves the quotes every 10 seconds. You can change this interval to whatever time you wish by changing the Interval property in timer1.
Below is the code that initializes the Excel Application Object so you can use it like any other class:
First I had to import the Excel library. This can either be done by adding a reference or adding the statement below:
using
private
ExcelObj.Visible =
Extras
Once you've populated an excel spreadsheet there are many things you can do with it. For example you can create a graph or write some more C# code to analyze your data or even populate a database. Hope this lesson gives you another way to think about your portfolio and sparks some possibilities for organizing your trading with .NET.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: