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
Raj R.Raj R. 

How to use Ant Migration Tool to run a report and export the data to a xls file?

We are trying to automate the exporting of a report to xls file rather than manually doing it through the UI. 

I am currently using the Ant Migration Tool to export the metadata for a particular report (i.e. "ExampleReport") and save the metadata in file "" file. The ".report" file is basically an xml format and contains the columns and filter for the report. 

How can i use this file to extract the data resulting from the report and save it as an xls file? Would i be able to use the Ant migration tool or would i have to use something like java to do this? file
<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns=".../metadata">

                <booleanFilter> 1 OR 2 </booleanFilter>
                          <columns> Opportunity.Name</columns>
                          <columns> Account.Name</columns>

         /* there are some other items, but for the sake of the length, i am omitting for now */

Best Answer chosen by Raj R.
Using Ant tool you can able to extract the meta data information not the actual data. I suggest you to take a look into the salesforce report api which will gives the report data along the schema in jSon string formate.

You can also schedule a report while run in the scheduled time and provide you the result in email in the html formate