spiralrain
New Member
- Joined
- Mar 24, 2018
- Messages
- 23
Hello, I wrote a macro a few years ago in Excel 2010 that opens a series of text files, imports the data, and manipulates it as needed. Our computers are being updated and we are getting Excel 2013. So I'm trying to update the code for my macro in preperation for this. The original line of code (that i'm now having trouble with) is:
Workbooks.OpenText ("C:\Users\Me\Desktop\Testdoc.txt"), DataType:=xlDelimited, Tab:=True
This line of code (in excel 2010) would open the text file in an excel document and all of the lines would be in a single column (which is what I want).
However, using excel 2013 and the same line of code, the text file is opened and often puts the lines in several columns (and once, in a single row with each line in a different column).
The lines of information within the text document have strings, numbers and dates. Each line is seperated by a tab.
I have been googling the problem, but have been unable to find an answer. Any help you can provide will be appreciated.
Workbooks.OpenText ("C:\Users\Me\Desktop\Testdoc.txt"), DataType:=xlDelimited, Tab:=True
This line of code (in excel 2010) would open the text file in an excel document and all of the lines would be in a single column (which is what I want).
However, using excel 2013 and the same line of code, the text file is opened and often puts the lines in several columns (and once, in a single row with each line in a different column).
The lines of information within the text document have strings, numbers and dates. Each line is seperated by a tab.
I have been googling the problem, but have been unable to find an answer. Any help you can provide will be appreciated.