Column Widths, Importing ANSI txt files

C

ConfusedNHouston

I have a file that is about 140 columns wide, with virtually each column
being set to a specific width that differs from the columns next to it. The
file now exists as an ANSI txt file (with the entire table essentially being
in a single cell). I cannot delimit on any given character because my data
(within the columns has zeros, commas, slashes, spaces, etc.).

Is there a way to take this text file and either during import or after
import "tell" excel to set Column A to 8 characters (and to pull those
characters from the text file)? To set Column B to 30 characters and pull
data from the text file, column C to 1 character.. etc... for all 140 columns?
 
R

RichardSchollar

Hi

Try recording a macro of you importing this file and place the column
delimiters where you want them. You can then reuse this to import the
file 9possibly after amending the code eg so that you can open files
with different file names/locations as required). This does assume
that this format will be maintained from one file to tne next.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top