I use ADODB.Connection and ADODB.Recordset to get data from csv files. The problem I am facing is that the delimiter seems not to work in case of semicolon (or other than comma). I am working with a semicolon as a delimiter. This is my code:
Public Function getDataFromFile(path As String, filename As String) As ADODB.Recordset
Dim cN As ADODB.Connection
Dim RS As ADODB.Recordset
Set cN = New ADODB.Connection
Set RS = New ADODB.Recordset
cN.Open ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & path & ";" & _
"Extended Properties=""text;HDR=NO;FMT=Delimited(;);IMEX=1;""")
RS.ActiveConnection = cN
RS.Source = "select * from " & filename
Set getDataFromUrl = RS
End Function
When I replace all semicolons to commas in the csv file everything works fine (same code, even with "FMT=Delimited(;)"). But it doesn't work with semicolon as delimiter.