Shop OBEX P1 Docs P2 Docs Learn Events
DAT file spacing — Parallax Forums

DAT file spacing

NewzedNewzed Posts: 2,503
edited 2007-09-17 21:01 in Propeller 1
If I type in Excel:

attachment.php?attachmentid=74045

and then copy and paste it into a DAT file, it appears like this:

trav3·· WORD· " L······ ",····· 150
····· ··· WORD· " I······ ",····· 200

How can I get rid of the extra spaces after L and I, and after ",.· I've tried resetting the tab stops but that doesn't help.· It still compiles OK, but just doesn't look neat.

Thanks

Sid

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.

That is why they call it the present.

Don't have VGA?
Newzed@aol.com
·
203 x 65 - 1013B

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-09-16 15:07
    I absolutely doubt that it is "OK", although it will compile of course.
    Within quotes the tabs separating the EXCEL fields will become spaces. However it seems the IDE does not honour the settings when reading from the clipboard....

    As you most likely want to keep some separators, you should edit it before pasting into the IDE in any program editor
  • NewzedNewzed Posts: 2,503
    edited 2007-09-17 21:01
    Problem solved!

    When I copied and pasted from Excel, the DAT list displayed:

    trav3·· WORD· " L······ ",····· 150
    ····· ··· WORD· " I······ ",····· 200

    I highlighted the portion shown in red, clicked on Edit/Find Replace and typed:

    REPLACE· WORD· "L",

    clicked on Replace All

    and the DAT list displayed:

    WORD· "L",····· 100

    I repeated the process for I, R and O, which are my four travel directions and in a matter of minutes everything was OK.· The extra spaces before the number are of no importance - the program just sees the number.

    Letting Excel format my DAT list from just two entries - direction and coordinate - ·will cut the DAT list formatting time in half.

    As my Uncle Ed used to say, "There's more than one way to·make a mule get up and go".

    Sid



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
Sign In or Register to comment.