Set objConnection = New ADODB.Connection
objConnection.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & CSVfolder & ";Extended Properties='text;HDR=NO;FMT=Delimited'"
objConnection.Open
Set objRecSet = New ADODB.Recordset
objRecSet.ActiveConnection = objConnection
objRecSet.source = "SELECT * FROM [" & CSVfile & "];"
objRecSet.Open , , adOpenStatic
This works great. However, the presence of the Byte Order Marker at the beginning of the file is causing international special characters to be read in/displayed incorrectly when used in string variables. If I first use Excel to open and then resave the CSV file as a regular comma delimited CSV file, not UTF-8, then the special characters import and display correctly. But I'm trying to avoid that step. Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.