Solved

vba open a text file into excel

Posted on 2006-07-04
2
224 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now