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

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
siskokid
Forum Newbie
Posts: 9
Joined: Mon Jun 25, 2007 2:10 am

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

Post by siskokid »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


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:

[syntax="vb"]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


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
ReverendDexter
Forum Contributor
Posts: 193
Joined: Tue May 29, 2007 1:26 pm
Location: Chico, CA

Post by ReverendDexter »

I don't think that Windows will allow you to do that - it's like opening the same excel file twice in excel: if you can evend do it, the second copy will be read-only (checking on XP, it won't even allow me to do it, it just brings that spreadsheet to front-focus).
Post Reply