I have the following macro:
%macro export_set_excel(data,tabname);
PROC EXPORT DATA= &data. OUTFILE= "&results." DBMS=EXCEL REPLACE;
SHEET=&tabname.;
RUN;
%mend export_set_excel;
My problem is that sometimes this macro doesn't delete the tab if it already exists. Is there anyway, from SAS, that I can check if a tab exists and delete it if it does?