C# and Excel

  • Thread starter Thread starter venky
  • Start date Start date
V

venky

Hello,

I have a C# program in which i need to read the data from the excel
file which is in network folder. The openign the excel file and reading
the data everything works fine with Excel class and other objects. Only
thing is there way to notify my application if the Excel files get
modified by any other user , if its modified i would know i need to
pick up the new data from excel file. Can .Net remoting be of any help
here?

Anyone has any idea let me know .
 
If you can read the file into your app already, why not just spawn a watcher
thread in your app that checks the files last updated property and have the
thread tell your app it needs to refresh its data. This will help you get
the files properties - plenty of threading examples around.

http://www.samspublishing.com/library/content.asp?b=STY_Csharp_24hours&seqNum=179&rl=1

or use a filewatcher that works over the network

http://www.codersource.net/published/view/277/watching_file_in.aspx

Regards

John Timney (MVP)
 
Hi,

While you are running your program you can do so by using a
FileSystemWatcher.

Please note that the shared location should be a NTFS , IIRC it does not
work in a FAT drive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top