I have to generate the excel report in the below format. Kindly help me on this.
Col Header 1 Col Header 2 Month
Jan Feb ..............................Dec
Row header1 Tbl_col
Row header2 Tbl_col
Row header3 Tbl_col
Row header4 Row header5
As in the above format we need to fill data every month the program runs.
Ex:- The report in 2010 will only have 3 months listed once December is here. Then in 2011, the only month on the report will be January, then when it is February month end January and February will be listed.
Although PROC REPORT could generate your report, when ODS creates a result file -- it creates the WHOLE file -- so using ODS and PROC REPORT, you could not "add" just a column for February to an existing Excel sheet that already contains data for January.
So using the ODS approach, in January, you would create a report that showed only January; then in February, you would overwrite the Excel file with a report that showed January and February; then in March, you would create a report that showed January, February and March. However, the report would not be "additive" -- it would be recreated in its entirety every month. If this approach is not what you had in mind, then Scott's suggestion to look at DATA step techniques is the way to go.