Hi ,
I am trying to export few datasets to different sheets of a excel file with the below code . It works fine but for one sheet it throws below error. If i delete that sheet and run again it works fine. But i cannot delete that sheet because there are many other graphs that reference from the sheet. Any help is greatly appreciated. I am using SAS 9.4
proc export data=stattrans
outfile= "&OUTDIR.\&loan_type._&product._report.xlsx" dbms=excel2007 replace;
SHEET="DATA_&testname.stat";
run;
error : Can not replace sheet because it has existing formulas that reference other page
Hi Reeza,
Sorry for the late response. Changing DBMS worked. Your help is much appreciated. 🙂
Thanks
LzG
I prefer to have the data sheets separate from the report sheets to avoid this kind of issue and to keep things clean and simple.
If that's not an option, a named range might be another way as mentioned.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: