Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Leading Zeroes Lost Saving HTML Table as Excel

12 views
Skip to first unread message

kilstromcraig

unread,
Oct 14, 2009, 3:08:52 PM10/14/09
to
Leading Zeros are lost when saving an HTML Table to an Excel
worksheet.

I use OLE Automation to create/open a worksheet populated with data
(using Open or OpenText automation functions) from an HTML table. The
leading zeroes are dropped.

I've been told in Microsoft forums that there is limited support for
importing HTML Table data. Though the same issue exists in opening/
imporint CSV files there are acceptable workarounds -- not so with
HTML Table data.

I have formatted data and I need to retain the formatting in the final
save worksheet. In fact, that's why this approach (saving as HTML
table and then saving as Excel worksheet) is used. However, we've
discovered that significant leading zeroes (don't tell folks in the US
NorthEast that the zeros in the first characters of their zip codes
are not significant) are truncated.

Is there a workaround or another approach that could be suggested?

We save the colors displayed in the dataobject reports and windows in
the Excel worksheet and our customers need the excel output and want
the colors retained.

We are using PB11 and Oracle10. Thanks.

Terry Dykstra

unread,
Oct 18, 2009, 5:39:46 PM10/18/09
to
I assume you are using a display format to show leading zeroes for a numeric
field.
You probably need to cast in your sql statement the number to a varchar in
order to preserve the leading zeroes properly when saving as html.

Terry Dykstra [TeamSybase]

"kilstromcraig" <kilstr...@yahoo.com> wrote in message
news:9b8a9525-9096-4c6a...@v25g2000yqk.googlegroups.com...

0 new messages