Hi, I had a puzzle as below: I have a excel (file name: caCat_Test_Plan_2019q1.xlsx) in the fold: &rootDir.projects/pmh/qa/qci/pmh-bene-car-cat/2019q1 I use this macro to import the excel file: %macro CsvExl_Import(location=, filename=, DBMS=, outfile=);
proc import datafile="&location./&filename..&DBMS."
DBMS= &DBMS.
REPLACE
out= work.&outfile.;
getnames=yes;
run;
%mend CsvExl_Import; The code for importing the Excel file: %let impl = 2019q1;
%CsvExl_Import(location= &rootDir.projects/pmh/qa/qci/pmh-be-car-cat/&impl.
,filename= caCat_Test_Plan_&impl.
,DBMS= xlsx
,outfile= caCat_Test_Plan_&impl.)
&rootDir. was defined at the beginning. Here is the log with one error: MPRINT(CSVEXL_IMPORT): proc import datafile="/u02/users/xlis/sas-fork/projects/pmh/qa/qci/pmh-be-car-cat/2019q1caCat_Test_Plan_2019q1.xlsx" DBMS= xlsx REPLACE out= work.caCat_Test_Plan_2019q1; MPRINT(CSVEXL_IMPORT): RXLX; MPRINT(CSVEXL_IMPORT): getnames=yes; MPRINT(CSVEXL_IMPORT): run; ERROR: Physical file does not exist, /u02/users/xlis/sas-fork/projects/pmh/qa/qci/pmh-be-car-cat//2019q1caCat_Test_Plan_2019q1. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE IMPORT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds I couldn't figure out the reason of having double slash before 2019 and the missing slash before the Excel file name, and causing the failure of importing. Asking for help to fix the problem. Thanks.
... View more