Hi,
I have the following code where 'recs' is a record set.
For i=0 to recs.Fields.Count - 1
if i = 0 then
pindnt = string(itmlvl*2," ")
response.write pindnt & recs(i)
else
Response.write recs(i)
end if
Response.write CHR(09)
Next
Using this part of code in my application I am exporting data from oracle database to excel, but leading zeros for one column "CURRENT_REVISION" are truncated in the excel sheet.
I am able to see the leading zeros only if I add a string(like ' - single quotes). Please see the below code where I am adding a string.But I don't want any string to the CURRENT_REVISION value in the excel sheet.
For i=0 to recs.Fields.Count - 1
if i = 0 then
pindnt = string(itmlvl*2," ")
response.write pindnt & recs(i)
else
if recs.Fields(i).Name = "CURRENT_REVISION" then
Response.Write "'" & recs(i) ' this is where I concatinated a string
else
Response.write recs(i)
end if
end if
Response.write CHR(09)
Next
My code does not contain any HTML or Javascript code. Using the below code I am exporting to Excel
<%Response.buffer = True
Server.ScriptTimeout = 1800
Response.ContentType ="application/x-msexcel"%>
This seems to be very small issue but eating a lot of my time.
Can anyone help me to resolve this issue.