Hi @pkopersk,
In addition to the issue with the macro calls resolving to invalid syntax (like "PROC step in a DATA step"), as pointed out by Kurt Bremser, your LENGTH statement should use the DATA step variable MTH, not the macro variable M in order to avoid truncation of the month names (longer than "janvier"). Personally, I would avoid national language characters in SAS names (my SAS version didn't even tolerate the accented characters in dataset names). You can use the BASECHAR function for an easy conversion:
data _null_;
length mth $9;
do yrs = 2018 to 2019;
do mth = 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre','décembre';
call execute(catx(',','%nrstr(%import_excel(C:\Users\a0782369\Desktop\testluk',yrs,basechar(mth),'RawData))'));
end;
end;
run;
... View more