• Sohit Sharma 4
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

Hi All,
I am trying to download csv file when i click on button. But when i click button i am getting like this in csv file.

{"index":93 name:"HideProfileElvVideo" value:false}. Below is my code

VF Page:

<apex:page controller="MyCustomListViewController" contentType="application/vnd.ms-excel#filename.csv">{!header}
<!-- <apex:pageBlock >
<apex:pageBlockTable value="{!Contacts}" var="contact" id="pbt"> 
<apex:column >
<apex:outputField value="{!contact.con.Name}"/>
</apex:column>

<apex:column >
<apex:outputField value="{!contact.con.Account.name}"/> 
</apex:column>
<apex:column >
<apex:outputField value="{!contact.con.Phone}"/>
</apex:column> 
<apex:column >
<apex:outputField value="{!contact.con.Email}"/>
</apex:column> 
</apex:pageBlockTable> 
</apex:pageBlock> -->
<!-- <apex:repeat value="{!Contacts}" var="contact" >
{!contact.con.Name},{!contact.con.Account.name},{!contact.con.Phone},{!contact.con.Email}
</apex:repeat> -->

<apex:pageBlock >
<apex:pageBlockTable value="{!Contacts}" var="contact" id="pbt"> 
{!contact.con.Name},{!contact.con.Account.name},{!contact.con.Phone},{!contact.con.Email}

</apex:pageBlockTable> 
</apex:pageBlock> 
</apex:page>

Hi,

I want to download the pdf automatically using render as pdf i tried using contenttype attribute.Its throwing error

Thanks & Regards,
Sindhu Ambarkar.

Hi

i wants to provide facility to files which i uploaded

i wants implement this in visualforce page

 

please put code also

thanks in advance

 rajesh