Last month, we highlighted the use of functions in reports. One of the questions we often get is: "How can I export data from a report to Excel?" The base report setup form has an [ ] Export to File box, which will allow you to select the data fields you want to export:
However, if you
only need a few of the fields from the cursor (what we call the raw data in the report), and especially if you need to run the same export repeatedly, there is a more efficient way.
Use the COPY2XLS function!
The COPY2XLS function (see
help guide description) can be added to a report with a JUSTAFTER, and can automatically export the data in the report to an Excel file.
In addition, you may specify a default filename and location (for the export file) AND, you can define the exact data fields you wish to export. So, the following command:
JUSTAFTER("COPY2XLS('nmname1,nmname3,nmemail')") - exports first name, last name, and email address to an Excel file and allows you to select location of saved file/enter file name.
If you always want the export file to go to a specific folder, you could add the parameter (the instruction) that would define where the file should be saved, and the file name:
JUSTAFTER("COPY2XLS('nmname1,nmname3,nmemail','c:\acehold\emails.xls')") - exports all fields to an Excel file named emails.xls into the c:\acehold folder.
If you need to do a repetitive export to excel, of specific data fields, check out COPY2XLS--it can be a real time saver.
Submitted by Chuck Havlicek