Page 1 of 1

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

Posted: Fri Aug 03, 2007 3:59 am
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]

Posted: Fri Aug 03, 2007 10:16 am
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).