LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default opening html table in Excel makes preceding 0's disappear??!!

I am programing in VB6.

I have an HTML file with a table inside. There are cells with values like
01, 02, 003,...
like this:
....
<tr<td01</td</tr
<tr<td02</td</tr
<tr<td003</td</tr
....
I change this file's extension .xls.

When I try to open this file in Excel by writing program, the data appear to
be without the preceding 0's. (i.e. they become 1, 2, 3, ...) It seems that
the excel worksheet has change the numberformat of my data automatically
upon file open.

My question is: How can I prevent this format changing from happening when I
open the file in Excel? (suppose I CANNOT change the data in the HTML table
beforehand)

For your reference, I write something like this in VB:

Dim xlsApp as Object
Dim xlsWS as Object
...
Set xlsApp = CreateObject("Excel.Application")
xlsApp.Workbooks.Open (App.Path & "\Temp.xls") ' after the code
runs, the excel file is loaded already
Set xlsWS = xlsApp.ActiveSheet
...


Thanks!

Yung

(P.S. I wrote a similar post in microsoft.public.excel.misc. But since my
problem involves programming, I re-post the question here.)


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom makes text disappear on one computer but not another... Delon Weuve Excel Discussion (Misc queries) 0 August 25th 09 06:01 PM
Inserting Text Makes Numbers Disappear! al Excel Discussion (Misc queries) 5 January 5th 08 02:38 PM
Why do the preceding zeros disappear when I remove dashes? carridin1 Excel Discussion (Misc queries) 3 June 5th 07 11:19 PM
Grouping selection in Pivot table makes all data disappear Kalila Excel Discussion (Misc queries) 0 September 27th 06 04:27 PM
HTML to Excel: preceding 0's disappear?! yung Excel Discussion (Misc queries) 1 March 11th 05 07:48 AM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"