If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Conversion to txt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-16-04, 09:17
fabienne fabienne is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
Conversion to txt

We need to find a way to convert one excel file to txt ( if possible without editing it afterwards) .
The txt file should have fixed fields.
i.e : i f you display the file, all columns should be aligned.

1rst field should be from position 1, length 7 - NUMERIC
2d from position 8, length 30
3d from position 38, length 20
4th from position 58, length 8
5th from position 66, length 4
6th from position 70, length 32
.....
Most of the fields are text ( ex name, address....) except 2 columns.

I tried to save it as "prn" but do not get expected results.- have one extra blank character on the first field.

Does someone have an "easy" solution ?
Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 01-16-04, 13:45
Smitty Smitty is offline
Registered User
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 153
Re: Conversion to txt

Have you tried saving as Text(Tab Delimited) or as CSV(Comma Delimited)?

Smitty
Reply With Quote
  #3 (permalink)  
Old 01-19-04, 06:48
fabienne fabienne is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
Re: Conversion to txt

Quote:
Originally posted by Smitty
Have you tried saving as Text(Tab Delimited) or as CSV(Comma Delimited)?

Smitty
Thanks.
Yes, I did.
Unfortunately using Text, Tab delimited, the columns are not aligned.
On the other hand the output file can not have any separator into the file, so I can't use CSV.
Using PRN I managed to create aligned columns but have one extra space on the first one .
Reply With Quote
  #4 (permalink)  
Old 01-19-04, 14:06
Xl-Dennis Xl-Dennis is offline
Registered User
 
Join Date: Dec 2003
Location: Östersund Sweden
Posts: 60
Hi fabienne,

If You use a fixed fonttype and with a size of 10 as well as autofit the columns then You should be able to get the correct output.

Let us know how it develops

Kind regards,
Dennis
__________________
Kind regards,
Dennis
Reply With Quote
  #5 (permalink)  
Old 02-16-04, 09:10
fabienne fabienne is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
Smile

Hi Dennis,

Thanks for the advice.
It worked .
In some case we need to do the autofit, in some not.

Regards


Fabienne




Quote:
Originally posted by Xl-Dennis
Hi fabienne,

If You use a fixed fonttype and with a size of 10 as well as autofit the columns then You should be able to get the correct output.

Let us know how it develops

Kind regards,
Dennis
Reply With Quote
  #6 (permalink)  
Old 02-16-04, 20:13
Xl-Dennis Xl-Dennis is offline
Registered User
 
Join Date: Dec 2003
Location: Östersund Sweden
Posts: 60
Hi,

Thanks for the feedback and I´m glad it worked out well

Kind regards,
Dennis
__________________
Kind regards,
Dennis
Reply With Quote
  #7 (permalink)  
Old 03-22-04, 17:03
rkifer rkifer is offline
Registered User
 
Join Date: Mar 2004
Location: Michigan
Posts: 1
Fixed Length in Excel

I have tried to do this as well using Excel and am not getting a fixed record length.

When I create the file and save it as .PRN, it saves all of my columns to the length that I specified except for the last column. My last column is to be 10bytes long, but the .PRN is adding a control record line feed at the end of each line, instead of padding it to 10. It is also adding one extra line at the end of the file.

Can anyone help?

Thanks!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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