PDA

View Full Version : DAT file spacing



Newzed
09-16-2007, 09:51 PM
If I type in Excel:

http://forums.parallax.com/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 (mailto:Module?Newzed@aol.com)
·

deSilva
09-16-2007, 10:07 PM
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

Newzed
09-18-2007, 04:01 AM
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 (mailto:Module?Newzed@aol.com)
·