Export asp to excel Format number

G

Guest

Hello
I am using asp for my page of prices and I am exporting the data and
Image(OWC) to EXCEL.
I need to export the data with number format with two decimals and i need to
make calculations or operations with the numbers exported in excel.
First I used the following code:
<TD STYLE="vnd.ms-excel.numberformat:#,##0.00><%=RS2("PRECIO")%> &nsbsp;</TD>

but, it exports 34,1 29,04 it doesn't respect the format of two decimals, it
omits the zeros and I cannot make operations for the coma.

Then I made a test with the following code:
<TD> <%=Response.write
Replace(FormatNumber(RS2("PRECIO"),2,-1,-1,0),",","."%></TD>

I use the replace to put point instead of comas, since excel only can make
operations with points.
This last code show me perfectly the format like I need it, 22.01 22.00
22.01 but I can not make operations in excel.

it exports it to me as text, and I need it as number.

Thanks

an excuse for my English
 
G

Guest

You posted this question on 11/30/2004 and it appears as though no one
responded to your inquiry. If you are still attempting to solve the problem
of "Export asp to excel Format number", then re-post your question in this
NewsGroup and one of us will take a fresh look at it. On your original
posting, you should click the YES or NO buttons to close out that entry on
the system.

Steve in Ohio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top