Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chris
 
Posts: n/a
Default Producing fix width text files

I want to export an excel file as a fixed width text file. I will have four
columns I want each to remain 10 charactors wide with the text left aligned
and numbers right aligned. How do I export in this format ?

Thanks

Chris

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

I'd use a helper column that would concatenate the values in the first for
cells:

=LEFT(A1&REPT(" ",10),10)
&RIGHT(REPT(" ",10)&TEXT(B1,"000.00"),10)
&LEFT(C1&REPT(" ",10),10)
&RIGHT(REPT(" ",10)&TEXT(D1,"000.0000"),10)

(all one cell)

Text in A1 and C1, numbers in B1 and D1.
Then drag down the column.
Then copy that column, paste into notepad and save my .txt file from there.




Chris wrote:

I want to export an excel file as a fixed width text file. I will have four
columns I want each to remain 10 charactors wide with the text left aligned
and numbers right aligned. How do I export in this format ?

Thanks

Chris


--

Dave Peterson
  #3   Report Post  
Chris
 
Posts: n/a
Default

Thanks Dave this almost solves my problem one final little obstical remains,
this is I wan to maintain the 0's at the end of a number eg 5.010 this
currently becomes 5.01.
any ideas?

"Dave Peterson" wrote:

I'd use a helper column that would concatenate the values in the first for
cells:

=LEFT(A1&REPT(" ",10),10)
&RIGHT(REPT(" ",10)&TEXT(B1,"000.00"),10)
&LEFT(C1&REPT(" ",10),10)
&RIGHT(REPT(" ",10)&TEXT(D1,"000.0000"),10)

(all one cell)

Text in A1 and C1, numbers in B1 and D1.
Then drag down the column.
Then copy that column, paste into notepad and save my .txt file from there.




Chris wrote:

I want to export an excel file as a fixed width text file. I will have four
columns I want each to remain 10 charactors wide with the text left aligned
and numbers right aligned. How do I export in this format ?

Thanks

Chris


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

This portion of the formula sets the format for numbers in column B:

&RIGHT(REPT(" ",10)&TEXT(B1,"000.00"),10)

So maybe...

&RIGHT(REPT(" ",10)&TEXT(B1,"0.000"),10)

Would work ok.

(or in the other portion for column D)



Chris wrote:

Thanks Dave this almost solves my problem one final little obstical remains,
this is I wan to maintain the 0's at the end of a number eg 5.010 this
currently becomes 5.01.
any ideas?

"Dave Peterson" wrote:

I'd use a helper column that would concatenate the values in the first for
cells:

=LEFT(A1&REPT(" ",10),10)
&RIGHT(REPT(" ",10)&TEXT(B1,"000.00"),10)
&LEFT(C1&REPT(" ",10),10)
&RIGHT(REPT(" ",10)&TEXT(D1,"000.0000"),10)

(all one cell)

Text in A1 and C1, numbers in B1 and D1.
Then drag down the column.
Then copy that column, paste into notepad and save my .txt file from there.




Chris wrote:

I want to export an excel file as a fixed width text file. I will have four
columns I want each to remain 10 charactors wide with the text left aligned
and numbers right aligned. How do I export in this format ?

Thanks

Chris


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing multiple Text files into Excel 2003 JMA Excel Discussion (Misc queries) 5 May 5th 05 09:48 PM
Export to fixed width text file FinChase Excel Discussion (Misc queries) 0 January 24th 05 07:25 PM
multiple text files URGENT tasha Excel Discussion (Misc queries) 1 December 19th 04 05:44 PM
importing multiple text files URGENT!!! HELP tasha Excel Worksheet Functions 0 December 19th 04 04:26 PM
importing multiple text files??? tashayu Excel Discussion (Misc queries) 0 December 19th 04 02:43 PM


All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"