I have a CSV with data separated by a semicolon ";" and I would like to open it in Excel with VBA. In my case, this VBA code will be run by users from various locations so I would like to write a code that will not be sensitive to local settings and produce the same output everywhere.
I have tried several codes but it doesn't work. I do not understand why after reading the documentation.
Set wb = Workbooks.Open(str_Path, Format:=6, Delimiter:=";")
Set wb = Workbooks.Open(str_Path, Format:=4)
Workbooks.Open Filename:=str_Path, Format:=xlCSV, Delimiter:=";"
Workbooks.OpenText str_Path, Semicolon:=True, DataType:=xlDelimited
Workbooks.OpenText str_Path, Local:=True
With all of these instructions, the workbook is open but the data are not properly separated.
For example, here is a result, it seems that it separate the row over "," and not ";" because my number "1,2" has been splitted:
Thanks a lot for any ideas ! :-)
Have a great day, Max