Re: EXCEL 2002 importing fixed width files

  • From: "Dale Leavens" <dleavens@xxxxxxx>
  • To: <jfw@xxxxxxxxxxxxx>
  • Date: Thu, 4 Dec 2003 22:45:33 -0500

This may be a long way around it but if you can write a VBA macro, open the
file and read the fields into variables of the fixed width required then
write them out to another file inserting a delimiter, close that file then
import it as a delimited file. This must be an ASCII file otherwise the data
would be encoded and no longer fixed length so it should be possible to
calculate the length of each data field by counting the characters using
something like NotePad or WordPad. You will need to know a little more VB
because you cannot manipulate files in that way with a recorded macro but
you may be able to use the recorder to begin assembling the code to navigate
to the file and some other aspects.

Hope this gives you some ideas.

Dale Leavens, Cochrane Ontario
dleavens@xxxxxxx
     Home of the Polar Bear Express!
----- Original Message -----
From: "Jason Boston" <jwb3301@xxxxxxxxxx>
To: <jfw@xxxxxxxxxxxxx>
Sent: Wednesday, December 03, 2003 11:33 PM
Subject: RE: EXCEL 2002 importing fixed width files


no delimiters, and not always white space either. just have to know the
column widths or your screwed.

Jason


-----Original Message-----
From: jfw-bounce@xxxxxxxxxxxxx [mailto:jfw-bounce@xxxxxxxxxxxxx]On
Behalf Of Reinhard Stebner
Sent: Wednesday, December 03, 2003 8:42 PM
To: jfw@xxxxxxxxxxxxx
Subject: RE: EXCEL 2002 importing fixed width files


What and how are the files formatted to start with?  Do they have
deleminaters?  Or are they just separated by white space?


-----Original Message-----
From: jfw-bounce@xxxxxxxxxxxxx [mailto:jfw-bounce@xxxxxxxxxxxxx] On =
Behalf
Of Jason Boston
Sent: Wednesday, December 03, 2003 7:33 AM
To: jfw@xxxxxxxxxxxxx
Subject: RE: EXCEL 2002 importing fixed width files


No, because in many of the files 5 or more fields will be right next to =
each
other with no spaces, commas, etc. I can't go in an put these in by hand
either, because we are talking about files that may be 500 to 2000
characters wide and 10000 to 1000000 lines long.

Thanks,
Jason


-----Original Message-----
From: jfw-bounce@xxxxxxxxxxxxx [mailto:jfw-bounce@xxxxxxxxxxxxx]On
Behalf Of Anna K Byrne
Sent: Tuesday, December 02, 2003 10:14 PM
To: jfw@xxxxxxxxxxxxx
Subject: Re: EXCEL 2002 importing fixed width files


Can you set it as delimited, using ~ or some such thing to separate the
columns?
At 09:02 PM 12/2/2003, you wrote:
>Hi all, I'm using JFW5 and Excel 2002.
>
>I need to import a fixed width ASCII file. However, the import wizard =
wants
>me to move the arrows on the screen to set the column widths for each
>column. How can I do this with Jaws? Surely there's an alternative =
method.
>
>Thanks,
>Jason
>
>
>To post a message to the list, send it to jfw@xxxxxxxxxxxxx
>To unsubscribe from this mailing list, send a message to
>jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject =
line.



To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.



To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.



To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.


To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.



To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to 
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.

Other related posts: