Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing leading zero when we download in excel from html table data.

Status
Not open for further replies.

ashokkumary

Programmer
Jul 11, 2019
1
IN
Hi Friends,
when i am downloading html table data into excel actually leading zero's are missing, could some one help on this.

Below is the code snippet.
htp.print( '<div style="width:100%; height:440px; overflow:auto;">');
htp.print('<TABLE ALIGN=CENTER BORDER=1 height=200px overflow=scroll CELLPADDING=0 CELLSPACING=0 WIDTH=150% style="border-collapse: collapse;">');
htp.print('<TR ALIGN=CENTER BGCOLOR=LIGHTBLUE>');
htp.print('<TD colspan="1" scope="colgroup" BGCOLOR="FFCC99"><B> Job No </B></TD >');
htp.print('</TR>');

Thanks
Ashok Kumar Y.
 
Are the leading 0's missing from the HTML or are they missing from Excel when it opens the HTML?

You're at the mercy of Excel's automatic handling of HTML. You could alternatively look at having the web server deliver an Excel file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top