Hello Folks,
I am trying to run the below code in SAS Studio in SAS Viya
data _null_;
rc = appsrv_header('Content-type','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
rc = appsrv_header('Content-disposition','attachment; filename=test.xlsx');
run;
ods excel file = _webout ;
title "&title";
proc print data=sashelp.class;
run;
ods excel close;
But it is showing error that
Program error.
68-185: The function APPSRV_HEADER is unknown, or cannot be accessed.
Actually i want to link this code with my graphs to download the excel file.
Please help
Regards,
Harsh Patel
The APPSRV_ functions are part of the Application Dispatcher, which is a SAS/IntrNet 9.4 component, and not available in Viya.
Thank You for your answer.
But what is the solution of my question whether i could download the excel file with this code or any alternate code?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.