Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone i used c# and i have software that shows share market data that tables are snaps into excel sheet when company shares are update then also that streaming excel sheet will be also get update immiedietly now i am creating a software that is shows same data but different kind now when company shares get upadate that my table should also update its is updating but i have to run all the time ...now i want when that excel sheet is update side by side my tables should also update automatically any solution
Posted
Updated 20-Mar-14 2:11am
v2

You should implement in C# an Excel Add-In that manage the events from Excel and automatically update your database's tables.

MSDN Walkthrough^]
 
Share this answer
 
Hello

You can write a program to monitor the file's last modification.
System.IO.FileSystemWatcher can be the ideal class to work with.

For example
string filePath = @"[directory of your excel file]";
           FileSystemWatcher watcher = new FileSystemWatcher();

           watcher.Path = filePath;
           watcher.NotifyFilter = NotifyFilters.LastWrite;

           watcher.Filter = "[name of your excel file ex. myexcel.xls]";
           watcher.Changed += new FileSystemEventHandler(OnChanged);
           watcher.EnableRaisingEvents = true;



Hope this will help you.
 
Share this answer
 
Hey vick, im in south africa creating more or less the same project, m company uses excel and sql database seeing that it is a client application, point of the story is,Do you have all the data you need?

which market are you targeting? forex, jse local?

so things to remember is that if you want a life feed updating a project there is royalties bound to it, also i must ask to answer your update question because TanvirRaihan basically answered your question , just remember to implement the correct references.

you must keep in mind that if this is a per second market data application that the downloading and updating stream will be a hell of a a process, so you might want to run them as background processing classes, both separate so that your connection does not clash, if this is like 15 min delay, it makes it easier but it would still be better to do this in background processing(bet you you are missing delphi now ;))

please return with all the details and i can work on a demo for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900