Hi all,
I have the following code which exports two datasets to separate
spreadsheets within the same workbook (excel file). However, I cannot
seem to get SAS to overwrite the existing sheet with the new data even
using the REPLACE option.
Here's my code:
----------
proc export data=a
outfile="&xl_out." replace;
sheet="SUMM1";
run;
proc export data=b
outfile="&xl_out." replace;
sheet="SUMM2";
run;
----------
My macro, &xl_out, simply defines the Excel file to export to.
The log reports no errors. When I open the workbook, I find two new
sheets, SUMM11 and SUMM21, created instead of dumping the new data
into the preexisting sheets, SUMM1 and SUMM2.
I cannot delete the existing SUMM1 and SUMM2 spreadsheets, as I have
formulas in other sheets that are linked to those two sheets.
Deleting the sheets will return the dreaded #REF! error.
Any ideas?
Thanks,
Gary