Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Jan 2004
    Posts
    3

    Re: Conversion to txt

    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 .

  4. #4
    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

  5. #5
    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




    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

  6. #6
    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

  7. #7
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •