Hi
I have an export step at the end of my code which exports to a excel document on a specific sheet.
Within that excel doc there is a second sheet which links to this data.
When I initially run (and on most subsequent runs) it all works fine however sometimes when I run I get an error message saying "Error: String is duplicated" plus some symbols in brackets.
If I get this error message it seems to still export data but also corrupts the excel file. I can go into the excel file but column names have moved, formats changed etc which shouldn't happen.
Does anyone know what this error message means and how to fix the issue. Odd how it only happens sometimes (though seems to happen more often if I run the full script rather than bit by bit). Code is below. Currently I am only testing it for one client but eventually this will be rolled out to run across multiple clients. I use SAS Studio but don't think this is important for this issue.
%macro Export (i,j); data &j._output; set summary ; where Client_name = "&i."; run;
PROC EXPORT DATA= WORK.&j._output OUTFILE= "\\<file location>\&i..xlsx" DBMS=xlsx REPLACE; SHEET = 'Raw'; RUN;
%mend Export;
%export(client 1,client 1);
... View more