locked
How to listen Excel Sheet continuously RRS feed

  • Question

  • Hello Techies,

    I am in the process of designing an application that will import data from Excel to SQL Server. I need your input.

    - I have some set of data in Excel sheet that keeps on refreshing [just like stock exchange pricing]. I need to capture each refresh of cell that same needs to be dumped in SQL server.

    Now the questions is this, I am thinking to develop the same application in C# but not getting how to keeps on listening the Excel Sheet regarding changes in cells. As cells are changing frequently with-in second it self, How to capture same using  C# code.

    The other alternative is VBA programming but thats I am not hands on.

    Please suggest or some one has done similiar kind of job earlier, please share your experience.

    Thanks a lot.
    Sunday, June 14, 2009 6:51 PM

All replies

  • I would look at where the data is coming from rather than the excel spreadsheet.  You can then listen to the data source and put it in SQL server.

    Hope this helps.
    Pl mark as answer or helpful if you found this useful
    Thursday, June 18, 2009 1:28 PM
  • Simple solution would be, using 'FileSystemWatcher' class, get notification whenever the excel file is updated. I don't know about your application design, but you need decide, do you really need to know which cell has been updated. If the data is not too large, I would suggest replacing the entire DB data with your excel data. That would be a simpler option.
    But if you selectively need to know which cell has been changed, then its going to be complicated.
    Monday, July 13, 2009 7:16 PM
  • Look at VSTO and write an Excel Addin in c#. However I don't understand why you'd have a client app making so many rapid changes. Is this a client app or really a server app? If it's the latter then I'd use a different mechanism, perhaps even Excel Services.


    http://pdkm.spaces.live.com/
    Thursday, July 16, 2009 9:56 PM