MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Very urgent and important


Posted by Duncan on January 30, 2001 6:22 PM

Hi everyone, How do I preserve the zero in front if I import a html file to excel format through the use of Get External Data--> New Web Query? For example, the html file contains 002,010,0001. After I have converted the html file to excel spreadsheet, the result is 2,10,1. The zero in front is ignored. How can I make the zero appear in the front. Thank You!


Posted by vbnewby on January 31, 2001 8:54 AM

Try putting single quotes in front of the leading zero numbers befor importing. '002.2.3 should come in as 002.2.3. Worth a try.....

Posted by Duncan on January 31, 2001 5:20 PM

Thank You very much. Your method works. However, I am not allow to change the content of the html or rather add a single quotes in front of the leading zero numbers in the html. May I ask whether there is any alternatives

Posted by vbnewby on February 01, 2001 11:00 AM

Tty formatting the cells of the Excel sheet you are importing into as text. Or try selecting 'text' as the Column Data Format for the columns with the leadinf zero strings.

Posted by Duncan on February 04, 2001 5:32 PM

I tried that before. However, it cannot work. Therefore, is there still any other alternatives. Thank You very much!