ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting a .txt file / fixed width (https://www.excelbanter.com/excel-discussion-misc-queries/64282-formatting-txt-file-fixed-width.html)

kteicher

Formatting a .txt file / fixed width
 

Hello:

I have a text file that I need to edit. The fields in the text file
are all fixed length (not tabbed). For example:

tzwaaaaaa lcust 000001waaaaaa lcust 7903
waaaaaa lcust 0078442040592

I would like to import a table of records like the one above in Excel
and be able to add additional rows. The paramaters being:

1) where 000001 is, I will have to increment each row by one.
2) where 0078442040592 is will be a totally different number, but with
the same exact # of digits.

When I save this "modified" file the field lengths must be exactly the
same as the original. I imported and created columns for ONLY the
sections that will not be exactly the same. However, when I saved the
file back out as text the spacing was not exact. (Spaces missing,
etc.)

I have tried a few things and have gotten close, but not exact. Any
help would be appreciated.

Can anyone give me any guidance on how to approach this, I am pretty
unsophisticated with Excel!

Thanks,

Keith


--
kteicher
------------------------------------------------------------------------
kteicher's Profile: http://www.excelforum.com/member.php...o&userid=21468
View this thread: http://www.excelforum.com/showthread...hreadid=499904



All times are GMT +1. The time now is 08:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com