Solved

vba open a text file into excel

Posted on 2006-07-04
2
225 Views
Last Modified: 2011-09-20
Hi,
    I have a text data file with fields separated by fixed widths. How do I use Workbooks.opentext to open it as Excel having all fields copied over ? Let's say the widths are 5 8 8 5. Thanks for helping.
0
Comment
Question by:azcalv408
2 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 200 total points
ID: 17039464
Unfortunatley it is not very easy; I would reccomend that you read it in a line at a time and dump the contents into the workbook yourself

however

http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov05/hey1117.mspx

Contains all the details on what is expected to do it
0
 
LVL 8

Assisted Solution

by:kaliyugkaarjun
kaliyugkaarjun earned 200 total points
ID: 17042049
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question