How to use the CSV Files

0

Not able to read the data from CSV file usign the file from following link.

Changed the tab to other in script file as well.

Automated Text Import in Excel with File Selection - The Easy Way - VBA
Answer
Discuss

Discussion

Hi Gurav

Not sure which link you mean (the cited tutorial? ) and without details (i.e. what happens when you try, on several CSV files?), your question is more like a complaint and can't be addressed
John_Ru (rep: 2467) Nov 24, '21 at 2:09 pm
Hi John,
I have downloaded your example file and tried to import CSV file having ; as data seperator. As advised in video I have changed the script from tab to other. When I am reading my CSV file with modified script everything is being read in the first cell itself.
Gaurav Nov 24, '21 at 10:33 pm
Add to Discussion

Answers

0

Gurav

Your question doesn't give much detail or a file but from the discussion (above), it seems your CSV file has a semi-colon as a spearator (so it's not really in Comma Separated Values format!). Assuming you don't want to convert them to text files, I suggest you try this modified section to the code accompanying Don's video tutorial (changes in bold):

        Workbooks.OpenText _
            Filename:=fileToOpen, _
            StartRow:=2, _
            DataType:=xlDelimited, _
            Semicolon:=True, _
            Local=True _
            Tab:=True
Hope this helps.
Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login