Hi SAS Forum, I have exported 10 SAS data sets to 10 different tabs of a same Excel file named “model_test.xls”. The code piece shown below, which is a part of a relatively long code, does the exporting job correctly. %macro name1(sheet_name,which_bank); PROC EXPORT DATA=k.Source_Data_Bank_&which_bank OUTFILE="\\Ad.noki.com\Cccp\Home\Fredrick\model_test.xls" DBMS=XLS REPLACE; sheet = "&sheet_name"; PUTNAMES=YES; run; %mend name1; %name1(sheet_name=Source_Data_Bank_10,which_bank=10); %name1(sheet_name=Source_Data_Bank_20,which_bank=20); %name1(sheet_name=Source_Data_Bank_30,which_bank=30); %name1(sheet_name=Source_Data_Bank_40,which_bank=40); %name1(sheet_name=Source_Data_Bank_50,which_bank=50); %name1(sheet_name=Source_Data_Bank_70,which_bank=70); %name1(sheet_name=Source_Data_Bank_80,which_bank=80); %name1(sheet_name=Source_Data_Bank_90,which_bank=90); %name1(sheet_name=Source_Data_Bank_100,which_bank=100); Question: When I try to open the excel file named “model_test.xls”, a dialogue box appears like this. File error: Data may have been lost ok But when I click the ok button in the above dialogue box, then the excel file comes with 10 tabs with correctly exported data. Have anyone of you come across this situation, and how to get rid of this dialogue box? Thank you Mirisage
... View more