0

I have a VBA sub that pulls data from multiple text files and I am currently working on importing this workbook from 32-bit excel to 64-bit excel.

My current connection string (which works on 32-bit excel) is as follows:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path & ";" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited;"";"

And, in the same folder that I have the text files, I have a Schema.ini file looking somewhat as follows:

[MyFile_1.txt]
Format=Delimited(|)
ColNameHeader=True
MaxScanRows=0
CharacterSet=ANSI

Now, in moving this to 64-bit, I'm getting an error due to the fact that JET is no longer supported. I'm figuring this needs to be moved to ACE or something similar, but I can't seem to get the correct connection string.

Any help on what the connection string would look like for 64-bit reading of delimited text files?

THANKS!

Johnny Willemsen
  • 2,942
  • 1
  • 14
  • 16
John Bustos
  • 19,036
  • 17
  • 89
  • 151
  • What version of Excel are you using? – u8it Sep 28 '15 at 20:37
  • http://sev17.com/2011/05/10/use-ace-drivers-and-powershell-to-talk-to-text-files/ shows for PowerShell but it's a similar approach for VBA Also see: https://www.connectionstrings.com/using-jet-in-64-bit-environments/ – Tim Williams Sep 28 '15 at 21:08
  • @TimWilliams, thank you!! - After a lot of fighting, I ended up getting it working using your links!! - **thank you!!!** – John Bustos Sep 29 '15 at 13:46

0 Answers0