Imelda Go, Abbas Tavakoli |
This example resulted from the need to report monthly data processing results by completing an Excel template used for reporting to the contracting party. In this case, the contracting party provided an Excel file with several formatted worksheets (e.g., first and second columns have bolding, cell shading, etc.) with the expectation that we would fill out the second-column cells. Instead of filling out the Excel template the customer provided, SAS creates an Excel file, which is made to look like the template. This example uses a "driver" table that maps each worksheet row to the SAS variable that has the value for the second column cell. The "driver" table also contains information that allows SAS to write into a text file the complete VBA in Excel macros, which can change the appearance of the exported file to look just like the required template. The "driver" can be extended to include columns that are useful for quality control when the programmer's work is checked by another programmer. |