I'm trying to extract some value from *.csv .The file looks like this:
with a following code I get a recordset
Function getCN_Ace16_csv(ByVal dbPath As String) As Object
Set getCN_Ace16_csv = CreateObject("ADODB.Connection")
getCN_Ace16_csv.connectionString = "Provider=Microsoft.ACE.OLEDB.16.0;Data Source=" & dbPath _
& "; Extended Properties=""text;HDR=Yes;FMT=Delimited"""
End Function
Function foo (ByRef report as Object) as Boolean
Set myConn = CN.getCN_Ace16_csv(report.ParentFolder.path)
myConn.Open
Set RS = myConn.Execute("SELECT * FROM [" & report.Name & "]")
End Function
When I get the recordset I don't see header names
For the first field a name is "п»ï" instead of "Product Details"
For all other "F2","F3" etc.
Have no idea how to extract info with a correct fields.Name Thank you for any help.
I don't want to use textstream - file is not big 10 - 20 rows, but it's a lot of code for a correct parsing.