Murray Brown
asked on
Excel VBA macro that can import any text file to Excel
Hi
Is it possible to build a macro that can import any text file to Excel
I have attached an example text file
Thanks
Order-Details.txt
Is it possible to build a macro that can import any text file to Excel
I have attached an example text file
Thanks
Order-Details.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here you are !!!
Rgonzo1971 did it for you in no sweat ! :)
Just a small note this would apply for the specific file type you posted not just any text file as if it is not comma separated then code would need to be modified.
gowflow
Rgonzo1971 did it for you in no sweat ! :)
Just a small note this would apply for the specific file type you posted not just any text file as if it is not comma separated then code would need to be modified.
gowflow
ASKER
Thank you both for the answer and the qualification
ASKER
Thanks
I think you need to give some more detail about what you want the macro to do with the text file.
Likeiwse, why have a macro when there is already the standard text import wizard that will convert text files into columns dependent on separators or column widths unless you then want to perform some tasks on the data once imported.
Example file looks like a fairly standard Comma Separated Values file so the Import wizard will handle it fairly easily using comma as the separator.
Thanks
Rob H