Hello
I am using XLSX engine to create XLSX file with 4 sheets (Export SAS data sets into XLSX file).
It is working 100% and I can see the XLSX that was created via SAS .
libname Ron XLSX "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim/Example4sheets.xlsx";
data Ron.cars;
set sashelp.cars;
run;
data Ron.classfit;
set sashelp.classfit;
run;
data Ron.baseball;
set sashelp.baseball;
run;
data Ron.air;
set sashelp.air;
run;
libname Ron clear;
Then I close SAS and open SAS again and I want to import the XLSX file -sheet1 into SAS data set called baseball
What is the way to do it please?
Which of the four sheets you created do consider SHEET1?
Looks to me like you created sheets named CARS CLASSFIT BASEBALL and AIR.
If you want to copy out CARS then run code like:
libname Ron XLSX "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim/Example4sheets.xlsx";
data want;
set ron.cars;
run;
Which of the four sheets you created do consider SHEET1?
Looks to me like you created sheets named CARS CLASSFIT BASEBALL and AIR.
If you want to copy out CARS then run code like:
libname Ron XLSX "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim/Example4sheets.xlsx";
data want;
set ron.cars;
run;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.