View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Rech[_2_] Jim Rech[_2_] is offline
external usenet poster
 
Posts: 533
Default Import a txt file with text fields that have meaningful leading sp

I didn't have that problem in Excel 2007. I tried several things because
you didn't post an example. Here's one:

123," abc", 123,456

Here I specified a comma delimiter and the third field as text. Both the
second and third fields had their leading spaces preserved in Excel 2007.
The first and fourth came in as numbers. In another example I removed the
quotes around the second field and the leading spaces were again preserved.

--
Jim
"Muehe" wrote in message
...
|I am using the import text file in excel 2007 and it is acting different
than
| it did in excel 2003
| i have a text field that can have leading spaces --the spaces are
menaingfull.
| In 2003, setting the field to text on the import preseved the leading
spaces
| -- not so with 2007. It left justifies the field.
| Just wondering if there is an option that i can set? Or some different
| method of doing it.