views:

473

answers:

2

Hello. I have a fixed width text file and I want to automatically import certain spaces in each line into specific cells of an Excel 2003 sheet. Can you help me?

I will re-phrase my question because the previous one wasn't very clear. I need to read specific characters (i.e. 12-17, 23-29) and place them inside a excel sheet. Is this possible?

A: 

Excel will parse out any whitespaces and leading zeros when reading text. If you can, format your text file as CSV with delimited values, and format your values as formulas, like this:

=" Value 1",="0000",="     more spaces     ",="    "

This will preserve the values.

cdonner
+1  A: 

Yes it's possible. Check the "Fixed length" option in the import wizard and tell Excel how many characters there is for each field.

dub