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
Mohammed zabi 6Mohammed zabi 6 

generate the google spreadsheet using apex class and vf page


  I have a new requirement to export the list view data to google spreadsheet using custom button in account tab list view  plz any one help me on this.

Carlos Campillo GallegoCarlos Campillo Gallego
Hi Mohammed,

You cant start with this and evolve it to meet your requirements:
// VF Page

<apex:page controller="contactquery" contentType="application/" cache="true">
    <apex:pageBlock title="Export Results" >
        <apex:pageBlockTable value="{!cs}" var="contact">
            <apex:column value="{!contact.ID}"/>
            <apex:column value="{!contact.Name}"/>

// Controller

public class contactquery{
    public List<Contact> cs{get; set;}
    public contactquery()
    cs = new List<Contact>();
       for (Contact c : [Select id, Name from Contact])

If you need someone to write the code for this project, you'll want to post over on the AppExchange site where you can match up with a developer looking to work on your project.