PC Review


Reply
Thread Tools Rate Thread

C# and Excel

 
 
venky
Guest
Posts: n/a
 
      14th Jun 2006
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 .

 
Reply With Quote
 
 
 
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      14th Jun 2006
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/librar...eqNum=179&rl=1

or use a filewatcher that works over the network

http://www.codersource.net/published...g_file_in.aspx

Regards

John Timney (MVP)


"venky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 .
>



 
Reply With Quote
 
Ignacio Machin \( .NET/ C# MVP \)
Guest
Posts: n/a
 
      15th Jun 2006
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.


--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"venky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 .
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Paste failed in excel file migrated from Excel 2003 to Excel Handong Chen Microsoft Excel Crashes 1 4th Mar 2010 06:05 PM
Application coded in excel 2000 when used in excel 2003 excel doesnot perform well and takes double the time to give the output Prince Microsoft Excel Programming 4 17th Feb 2009 03:05 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= Microsoft Excel Programming 0 5th Oct 2007 10:26 AM
Excel 2003 crashes loading excel files created Excel 2000 =?Utf-8?B?SmVmZiBMZXdpbiAgQXVzdHJhbGlh?= Microsoft Excel Misc 0 27th Jun 2005 04:20 AM
Why my Excel 2003 don't open excel files by duble click on excel . =?Utf-8?B?VmFseQ==?= Microsoft Excel Crashes 1 20th Jan 2005 03:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 AM.