Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export asp to excel Format number
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export asp to excel Format number
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 "Lilia" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to export excel file in dbf format | Excel Discussion (Misc queries) | |||
how do I export excel to a monthly calendar format? | Excel Discussion (Misc queries) | |||
underscore between name in excel csv format to export names into o | Excel Worksheet Functions | |||
VBA export excel to .txt, number format problem | Excel Programming | |||
import- export XML in excel without loosing XML format | Excel Programming |