The SAS Output Delivery System and reporting techniques

tagset ExcelXp help

Reply
N/A
Posts: 0

tagset ExcelXp help

Hi,
I'm creating multiple worksheets report for my folks. I was able to do that on my desktop( local) but when I try to make changes to the code and put it on the webserver it doesn't work. I guess I'm doing something wrong in having sas read the ExcelXP.sas file on the sever.I'm not sure though. HEre is the code:

%include 'C:\Addy\ExcelXp.sas';
libname TP "C:\Addy";run;

proc template;
define style TP.XLSasweb;
parent = styles.sasweb;
end;
run; quit;

%let RV=%sysfunc(appsrv_header(Content-type,application/vnd.ms-excel));
%let RV=%sysfunc(appsrv_header(Content-disposition,attachment; filename=
"TPTEst.xls"));

options center;
ods listing close;

ods tagsets.excelxp file=_webout ;
ods tagsets.ExcelXP options( embedded_titles='yes' embedded_footnotes='yes' sheet_interval='none' sheet_name='Visit 1');
TITLE " Visit 1";
footnote "TP Study";
proc print data=Visit1 noobs label ; run;
ods tagsets.excelxp options(embedded_titles='yes' embedded_footnotes='yes' sheet_interval='none' sheet_name='Visit2');
TITLE " Visit 2";
proc print data=Visit2 noobs label ;
footnote "TP Study";
quit;
ods tagsets.excelxp close;
ods listing;

As I said if I run this on my local desktop it work... can someone help me with this..

Thanks for you Help.

Regards,
Addy
SAS Super FREQ
Posts: 8,743

Re: tagset ExcelXp help

Hi:
Your use of the APPSRV_HEADER function implies that you are using SAS/IntrNet???? Is it possible that you have SAS 9.1.3 or SAS 9.2 on your desktop and maybe have SAS 8 on the Application Server machine???

If you are using SAS/IntrNet, have you turned on the _DEBUG option when you invoke the program so that you can see that SAS log???

It's not clear to me what you mean by "having sas read the ExcelXP.sas file on the server"??? If you're using SAS/IntrNet (which is the only reason for using APPSRV_HEADER) -- then all you have to do is put your .SAS program in the correct Application Server library and invoke the program with the correct URL...for example:
[pre]
http://www.server.com/cgi-bin/broker.exe?_program=applib.pgmname.sas&_service=default&_debug=2
[/pre]

If you do not have or are not using SAS/IntrNet's Application Broker, Application Server and Application Dispatcher, then your use of APPSRV_HEADER is not needed. Since it's not clear what your configuration is or what you're trying to accomplish with APPSRV_HEADER (in the absence of SAS/IntrNet), you might wish to work with Tech Support on this question. Note that the sample URL which I show for SAS/IntrNet implies that you have the BROKER.EXE program installed on your web server machine. If you have SAS installed on a network server (as opposed to a web server) and you want to "batch" execute a .SAS program on the server machine, then the URL method shown above is not the appropriate method for your program.

cynthia
N/A
Posts: 0

Re: tagset ExcelXp help

Cynthia,
I'm using SAS?IntrNet. Broker.exe is also installed on the web server.

"having sas read the ExcelXP.sas file on the server": In order for the excel tagsets that I have in my code to work , I need to run the EXCELXP.SAS program initially. SO if its on my local system I run it first and then run my program that creates the XML file. But when running this program from the network server I'm not sure how to run the excelxp.sas program first.

What I did is, I placed the excelxp.sas program on the sever and called it by

%include 'C:\Addy\ExcelXp.sas';

if you see the code I placed it just before I started using tagsets.

I assume that the above code excutes the Excelxp program that is sitting on the C drive on the Web server. But if it runs then my output should look exactly as the local output, which is not the case. How to I turn on the _DEBUG option?

Also, the link that you posted is not working.. can you post a new link..

Thanks for helping me out.
Addy
SAS Super FREQ
Posts: 8,743

Re: tagset ExcelXp help

Hi:
My first try would be to put ExcelXP.SAS into the SAME physical location in the application server library as your other SAS/IntrNet programs and then do a relative %include:
[pre]
%include 'ExcelXP.sas';
[/pre]

...but that may not work. I don't have SAS/IntrNet on my machine to test anymore, so, sadly, I can't test this. Most of what I used to do with SAS/IntrNet involved using AUTOCALL macro programs and not %include.

You really might want to work with Tech Support on this question, as they have SAS/IntrNet available for testing.

cynthia
N/A
Posts: 0

Re: tagset ExcelXp help

Just tried %include 'ExcelXP.sas'; and didn't work. I'll check with the technical support team.
Cynthia, Thanks for helping me out ....

Addy
Ask a Question
Discussion stats
  • 4 replies
  • 211 views
  • 0 likes
  • 2 in conversation