The SAS Output Delivery System and reporting techniques

tagsets.Excelxp

Reply
Frequent Contributor
Posts: 115

tagsets.Excelxp

I am getting below issues in 9.4 with Excelxp tagsets version v1.130, but not seen these issues in 9.2 by using exactly same excel statements in Stored process

1. Using Stored process Execution result is Stream, disabled %STPBEGIN & %STPEND macros in stored process

2. using below code in stored process

ods listing close;

*ProcessBody;

data _null_;

   rc = stpsrv_header('Content-type','application/vnd.ms-excel');

   rc = stpsrv_header('Content-disposition','attachment; filename=report.xls');

run;

ods tagsets.ExcelXP file=_WEBOUT options(doc="Help" default_column_width='15, 4, 20, 25, 10' width_fudge='0.75' sheet_name="REP1") style=sansprinter;

  proc report data= Final nowd;

run;

ods tagsets.ExcelXP close;

By using above , i am not getting any error while running the stored process from information delivery portal except column adjustment issue in excel, but getting attached popup window  and generating HTML code in EG. How to avoid this issue while running from EG also

even I tried with file='a.xls' in ods statement, but still not seeing result in both EG and IDP.

As attached i am seeing more column width than data length, Excel Column width is occupying  almost variable length defined in dataset, but real scenario data length is varying in dataset. How to make exact  auto_column_width for all character and numeric columns.

Can anyone help me on this.


EG Issue.pngExcel format issues.png
Super User
Posts: 11,343

Re: tagsets.Excelxp

Posted in reply to sunilreddy

Have you tried Absolute_column_width instead of Default_column_width?

Frequent Contributor
Posts: 115

Re: tagsets.Excelxp

I tried, but thats giving fixed length, in my scenario data length will vary

SAS Super FREQ
Posts: 8,862

Re: tagsets.Excelxp

Posted in reply to sunilreddy

Hi: Did you post your EG error? I don't see anything in EG you posted a screen shot of what looks like Excel, not Enterprise Guide.

cynthia

Frequent Contributor
Posts: 115

Re: tagsets.Excelxp

Posted in reply to Cynthia_sas

I've included both screenshots in original post

SAS Super FREQ
Posts: 8,862

Re: tagsets.Excelxp

Posted in reply to sunilreddy

Ah, sorry, did not see that image file. The error message is telling you the problem. The stored process you wrote was set to create STREAMING output results. This will work in the Information Delivery Portal because the web browser can open Excel as a "helper" file to read the contents sent by the stored process. EG on the other hand can only receive certain types of output from a stored process. EG cannot open a "helper" file like a browser can. If you had posted this question in the stored process Forum, you probably would have found more relevant help.

  Your STPSRV_HEADER change is telling the receiving application to open use Excel to open the streamed stored process results. So your problem is twofold: 1) EG doesn't use streaming output (specifically, the _WEBOUT file reference is designed only for WEB clients and EG is NOT a web client) and 2) EG can't open Excel in the same way that the Portal can. You might want to work with Tech Support on this.

cynthia

Ask a Question
Discussion stats
  • 5 replies
  • 665 views
  • 0 likes
  • 3 in conversation