Hi ,
In proc export for excel I have given sheet name as
sheet='Value Level Terminology';
But am getting the output in excel sheet as
'Value_Level_Terminology';
I dont want this '_ ' between the sheet names.Does anyone know how to get the output as 'variable mapping'. thanks in advance.
@Aayushi_17 wrote:
am using 9.4 version.
proc export data=d_outi.variable
outfile='C\newfolder\pricesheet.xls'
label dbms=xls replace;
sheet='variable label';
run;
this is the code i used to export the excel file
The options mentioned by @SASKiwi don't solve the issue seems to be a feature when creating files in the outdated excel-format xls. Can you change to xlsx?
proc export data=sashelp.class
outfile="PATH\class.xlsx"
label dbms=xlsx replace;
sheet='variable label';
run;
Try adding this OPTIONS statement before your export code:
options validvarname = any validmemname = extend;
I tired this but still getting the same output
Please post the code used to export the file. Which SAS version are you using?
am using 9.4 version.
proc export data=d_outi.variable
outfile='C\newfolder\pricesheet.xls'
label dbms=xls replace;
sheet='variable label';
run;
this is the code i used to export the excel file
@Aayushi_17 wrote:
am using 9.4 version.
proc export data=d_outi.variable
outfile='C\newfolder\pricesheet.xls'
label dbms=xls replace;
sheet='variable label';
run;
this is the code i used to export the excel file
The options mentioned by @SASKiwi don't solve the issue seems to be a feature when creating files in the outdated excel-format xls. Can you change to xlsx?
proc export data=sashelp.class
outfile="PATH\class.xlsx"
label dbms=xlsx replace;
sheet='variable label';
run;
Thanks this one worked
@Satish_Parida wrote:
The only difference between the codes are dbms=xls(old) and dbms=xlsx. How this fixed this issue?
Asking this to get a clear clarification.
Could be a bug/feature in proc export. Afaik xls supports blanks in sheet-names. You will need to contact tech-support for more information.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.