I have a scenario where db2 SQL query should fetch the data in to a CSV file and the csv file's data should be separated with a pipe delimiter, I have done that by using regional settings change in control panel by changing the List Separator to |
(pipe) from ,
(Comma) ...after this step the flow in my program is, there is a VBA code in a xlsm file which opens this pipe delimited CSV file and copies its contents to it but here the default delimiter is changed to ,
(comma) automatically and not considering the pipe delimiter. I have debugged the VBA and the issue is with
workbooks.open("Path\file.csv")
here the csv file is opened with comma as a default delimiter and copied to the xlsm file.
ex: The pipe delimited csv file data is like the below one which was correctly separated in to multiple columns by the pipe delimiter
1234567|jane,smith|canada|False...
But the .xlsm file is opening the file which is as shown below and copying the data to it into just two columns by considering the comma as a separator, the name field is fetched as last name and first name with a comma in between which is acting as a delimiter and separating the multiple columns to two columns.
1234567|jane smith|canada|False..
How to make this xlsm file to consider the delimiter as pipe but not comma..any code should be written or any settings change?