Handling data in an Excel Table of a file.xls ! Help please

Author Message
siskokid

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 8/2/2007
  • Status: offline
Handling data in an Excel Table of a file.xls ! Help please Sunday, August 05, 2007 6:40 PM (permalink)
0
Good mourning everyone

I have the following problem -
I need to read the records ina an Excel table. I use the following piece of code:





VisualBasic:


objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source='" & path & "\" & file & "';" & _
                         "Extended Properties=""Excel 8.0;HDR=Yes;"";"

... and some more of course, but this is the important one

Everything goes perfect, as long as the file.xls is not open. Then I cannot reach the table in it Does anyone know how can I set the connection properties ( or extended properties), so that I am still able to read the records, even if the *.xls file is open?

Any help will be highly apreciated and needed

Best,
siskokid
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    RE: Handling data in an Excel Table of a file.xls ! Help please Monday, August 06, 2007 6:14 AM (permalink)
    0
    Well, Excel is not a transactional database no matter how much you try to treat it like one. So even if there were a way to do this (and I'm not convinced that there is) it would still be a bad idea.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      cesarsju

      • Total Posts : 1
      • Scores: 0
      • Reward points : 0
      • Joined: 10/8/2007
      • Status: offline
      RE: Handling data in an Excel Table of a file.xls ! Help please Monday, October 08, 2007 10:31 AM (permalink)
      0
      Ever get this resolved?  I was working on something similar today where I needed to create a page where users can upload an xls file then read the contents then write the resulting date into a sql table...I'm only a jr dev guy so it kinda took me like 4 hours to figure out.  Was kind of annoying but I got it to work

       
      #3
        webber123456

        • Total Posts : 58
        • Scores: 0
        • Reward points : 0
        • Joined: 9/20/2007
        • Status: offline
        RE: Handling data in an Excel Table of a file.xls ! Help please Tuesday, October 09, 2007 4:31 AM (permalink)
        0
        When you need to read from the excel file you might try locking the application until the read is complete then unlock the application to continue.
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9