tommym121
asked on
Open a csv files with delimiter rather than comma in VBA
How do I open a text file with exclamation mark as me cell seperator?
Set xwb = Workbooks.Open(filename)
Set xWorkSheet = xwb.Sheets(1)
DO I use some other arguement for Workbooks.Open?
Set xwb = Workbooks.Open(filename)
Set xWorkSheet = xwb.Sheets(1)
DO I use some other arguement for Workbooks.Open?
ASKER
Does not seems to work with this file, I use ~ instead of ! for OtherChar:="~"
abc.csv
abc.csv
Try changing the file extension to .txt and it should work. (for example, abc.csv.txt)
ASKER
wdosanjos:
Thanks. It works. But would you mind tell me why adding the new extension will work. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
Open in new window
I hope this helps.