![]() |
VBA - import txt file using space separator
From my experience, you need to have a schema.ini file just because your
text file does not contain the standard value separator which is ";". Then the text driver will use Your schema.ini file instead of what is defined in your registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Text here is what I have with Windows XP Pro: Format\Delimited(;) I tried to insert Format=Delimited( )into my connexion string as you did: CxnFile.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & PathFile1 & ";" & _ "Extended Properties=""TEXT;HDR=NO;Format=Delimited( );FIL=text;""" but this raises an error: -2147217904 So let me know if you found, but programmatically creating a temporary schame.ini file is not so difficult. Regards, Phil *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com