BookmarkSubscribeRSS Feed
sunilreddy
Fluorite | Level 6

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
5 REPLIES 5
ballardw
Super User

Have you tried Absolute_column_width instead of Default_column_width?

sunilreddy
Fluorite | Level 6

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

Cynthia_sas
SAS Super FREQ

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

sunilreddy
Fluorite | Level 6

I've included both screenshots in original post

Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1543 views
  • 0 likes
  • 3 in conversation