Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


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

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,50375
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Handling data in an Excel Table of a file.xls ! Help please
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Handling data in an Excel Table of a file.xls ! Help pl... - 8/5/2007 5:40:44 PM   
  siskokid

 

Posts: 2
Score: 0
Joined: 8/2/2007
Status: offline
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
 
 
Post #: 1
 
 RE: Handling data in an Excel Table of a file.xls ! Hel... - 8/6/2007 5:14:07 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
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

(in reply to siskokid)
 
 
Post #: 2
 
 RE: Handling data in an Excel Table of a file.xls ! Hel... - 10/8/2007 9:31:09 AM   
  cesarsju

 

Posts: 1
Score: 0
Joined: 10/8/2007
Status: offline
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

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Handling data in an Excel Table of a file.xls ! Hel... - 10/9/2007 3:31:05 AM   
  webber123456

 

Posts: 37
Score: 0
Joined: 9/20/2007
Status: offline
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.

(in reply to siskokid)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Handling data in an Excel Table of a file.xls ! Help please Page: [1]
Jump to:





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
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts