function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anuj_BakshiAnuj_Bakshi 

Ouput Formula as currency output in excel output visualforce page

Hi All !

I am currently generating an excel output with formula in the table: <td>=ROUNDUP(C{!rowNum}*D{!rowNum}/100,0)</td>
The output generated comes in the format:
800000
I actually want the output in the format:
$800,000

How do I achieve this?

Thanks!
Anuj
Flexamove FlexamoveFlexamove Flexamove
Flexamove joint medicine is a product that everyone desires as no one wants to experience ache issues at some point of their lives because ache is one of the worst emotions every person stories in their lives. website You do not need to worry about some thing because this product is free from all forms of harmful or terrible consequences. Let's see how pain impacts the human frame?
 
Dushyant SonwarDushyant Sonwar
Hey Anuj ,

You need to do something like this . where total number is the integer variable and floor removes the decimal point and {0,number,#,##0} pattern does the formatting.
 
<apex:outputText value="{0,number,#,##0}">$
        <apex:param value="{!FLOOR(totalNumber)}" />
    </apex:outputText>

Hope this helps!
 
Rahul pandey 53Rahul pandey 53
Check out our latest sad shayari (https://allhindishayari.in/sad-shayari-hindi/)
Anuj_BakshiAnuj_Bakshi
Hey Dushyant!
I have already tried this but this doesn't work because param value does not take formula as an input.
If I get the direct value from a field in salesforce then I am able to do it this way but the reuirement is that the ouput should be done by a formula and not populated directly.
Thanks for your response, let me know if you have any other ideas!
Dushyant SonwarDushyant Sonwar
Hi Anuj,

Param does take formula as an input. it is working in  my dev org. 
User-added image

Output :
User-added image
Could you post your vf page and apex class code ?
Dushyant SonwarDushyant Sonwar
What error are you getting when you using the formula in param. Could you also post the snapshot of error msg?