Export to Excel problems

  • Thread starter Thread starter dcarva
  • Start date Start date
D

dcarva

Hello,

I am trying to import a web page that has serial numbers that star
with three zeros: (I tried this with Excel XP and Excel 2000)

0003433
0003333
0002222
etc.

When the data is imported, the leading zeros are trimmed. I have eve
tried to format the entire spreadsheet cells as Text...to no avail
Here is what I do:

1) In Excel, select Data->Get External Data->New Web Query.
2) Enter url in the first textbox of the New Web Query dialog.
3) Click Ok twice.

The data gets inserted without zeros. I have tried all availabl
options.

Any ideas?
Thanks,
Dann
 
Thanks, but I don't get this option when importing from a web query:

"After you select your field width for your column breaks, in the nex
window choose "Text" for your "Column Data Format" after selecting bot
columns in the "Data Preview" window."

There is no place that I can select "Text" for data column format. I
appears to work differently when importing a file. I even pre-formatte
the cells as "Text" and used the "Preserve call formatting" whe
importing the web page data.

Thank
 
If the serial number all have the same length, as in your example, why not
use a custom format

Format>Cells...>Custom

and enter 0000000 (seven zeroes)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Thanks Nick. That worked. Unfortunately, some values have 6 digits, som
have 5, 12, etc. I would have to manually format them in groups an
there are huge numbers of these. It seems that if I set all fields t
text, that the incoming text should keep the leading zeros. I've eve
specified the option to preserve cell formatting.

Thanks,
Dann
 
Thanks Nick. That worked. Unfortunately, some values have 6 digits, som
have 5, 12, etc. I would have to manually format them in groups an
there are huge numbers of these. It seems that if I set all fields t
text, that the incoming text should keep the leading zeros. I've eve
specified the option to preserve cell formatting.

Thanks,
Dann
 
Back
Top