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
Radhika pawar 5Radhika pawar 5 

How to export google chart to excel from VF Page

Hi Frnds Plz Guide me for Exporting  Google Chart to excel From Vf Page .


<script type="text/javascript"> // google.load("visualization", "1", {packages:["corechart"]}); // google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['X', '{!lstwrap1Sub[lstwrap1Sub.size-1].grouper}'], ['Govt Official', {!lstwrap1Sub[lstwrap1Sub.size-1].Govt_Official}], ['state_head', {!lstwrap1Sub[lstwrap1Sub.size-1].state_head}], ['SRG', {!lstwrap1Sub[lstwrap1Sub.size-1].SRG}], ['BC_DRL', {!lstwrap1Sub[lstwrap1Sub.size-1].BC_DRL}], ['MME_TEAM', {!lstwrap1Sub[lstwrap1Sub.size-1].MME_Team}], ['Other_Visits', {!lstwrap1Sub[lstwrap1Sub.size-1].other_visit}] ]); var options = { title: 'Monitoring Visits' }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } </script>
 
Gaurav NirwalGaurav Nirwal
public Map<String, String> GTINCodeFormat {get; protected set;}

if (p.Product__r.GTIN_pfi__c != null) {
s = 'vnd.ms-excel.numberformat:';
codeLen = p.Product__r.GTIN_pfi__c.length();
for (Integer i=1;i<=codeLen;i++) {
    s += '0';
}
GTINCodeFormat.put(p.Product__r.Oracle_Item_Code_pfi__c, s);
}  else {
GTINCodeFormat.put(p.Product__r.Oracle_Item_Code_pfi__c, '@');
}
Radhika pawar 5Radhika pawar 5
Plz I cant understand? plz explain me?