You need to sign in to do that
Don't have an account?
padmini ss
Generating To CSV file
Hi This is my Vf page :
While eporting to .CSV file am getting this output.
Actual Problem is I exported as
<apex:page showHeader="false" Sidebar="FALSE" standardController="Order" cache="true" extensions="SalesOrderReportGenerator" action="{!SalesOrderReportData}" contentType="Charset=UTF-8;text/octet-stream#Account.csv;"> <apex:dataTable value="{!sapRecordListFinal }" var="w" width="1" border="1"> <apex:column headerValue="SFDC SO No" > <apex:outputText value="{!w.orderRecord.OrderNumber}"/> </apex:column> <apex:column headerValue="Order Type" > <apex:outputText value="{!w.orderRecord.Type}"/> </apex:column> <apex:column headerValue="Sales Org " > <apex:outputText value="{!w.orderRecord.Sales_Org__c}"/> </apex:column> </apex:datatable>There are so many columns , i just showed only few columns.
While eporting to .CSV file am getting this output.
Actual Problem is I exported as
contentType="application/csv#RenderAsTestFile.xls"
This is working fine, but our clint have problem with date fileds...like
Date format should be DD/MM/YYYY. But after extraction it is showing as single digit. for example if the date is 7/1/2015 the format should be 07/01/2015(The desired output should be like this).
Also i want to know where i am doing the mistake , please help me, in this .CSCV file foramt, cuz i want to show the client in CSV format also
thanks
Update your date field code like below. Link for full documentation http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_outputText.htm
Mark this as Best Answer, if it solves your problem.
Best Regards,
Mithun.
but after eporting to .xls file it is chaging to d/m/yyyy like 7/9/2014
in excle sheet i want automatically with out modifing the excel sheet U.K date format dd/mm/yyyy format ,
hope you understood my problem
Have you tried to change "escape" and "lang" attributes in outputtext component.
Best Regards,
Mithun.
Try below samples.
(OR)
Best Regards,
Mithun.
when i use lang in .csv file it is showing as <div span.....\> something like this,
any how we mailed to clint that to change the excle sheet date format Uk dd/mm/yyyy fomrat. only
thanks for shairing your knowledge MithunP, thankyou very much.