You need to sign in to do that
Don't have an account?
hemanth tanguturi 10
comma seperator issue in csv download from vf page
Hi,
I have a issue with comma seperator in csv file download.
<apex:page controller="AnalysisController" contentType="application/vnd.ms-excel#Analysis.csv">
<apex:outputText value="{!price}" >
this is what i am using in the vf page to print the price value. Here price is a string 6,44,567.00 as this string is having comma the out put is splitting in to different cells, like 6 in one cell 44 in other and 567.00 in other cell.
How can I over come this issue?
1) As the source of my report is from multiple Maps i am not able to download in xls
2) Tried to use format for outputtext component but here in my case the value is string
3) Tried to remove the comma using substitue but as my app supports multiple locale, people in some locale uses comma as decimal seperator hence can't remove comma.
Thanks in advance.
Hemanth
I have a issue with comma seperator in csv file download.
<apex:page controller="AnalysisController" contentType="application/vnd.ms-excel#Analysis.csv">
<apex:outputText value="{!price}" >
this is what i am using in the vf page to print the price value. Here price is a string 6,44,567.00 as this string is having comma the out put is splitting in to different cells, like 6 in one cell 44 in other and 567.00 in other cell.
How can I over come this issue?
1) As the source of my report is from multiple Maps i am not able to download in xls
2) Tried to use format for outputtext component but here in my case the value is string
3) Tried to remove the comma using substitue but as my app supports multiple locale, people in some locale uses comma as decimal seperator hence can't remove comma.
Thanks in advance.
Hemanth
You will have to enclose the contents within double quotation marks " ".
For example, I would suggest you refer below link which has answers for the same.
http://stackoverflow.com/questions/769621/dealing-with-commas-in-a-csv-file
Hope this helps you!
If this helps you, please mark it as solved so that it will be available for others as a proper solution.
Thanks and Regards
Sandhya