The SAS Output Delivery System and reporting techniques

Simple one hopefully - ODS excel XP tagset problem -

Reply
N/A
Posts: 0

Simple one hopefully - ODS excel XP tagset problem -

When I use the above to get output from proc tabulate, the columns are not set out in excel properly - i just get everything in the column A cells - with values seperated by half pipe symbols eg: . 949| 528| 1043| 1031| 1132| 850| 899| 447|. Being new to this It could be an obvious fix.

I tried some sas example code which works fine, using the same ods statement/tagset, but example data so what's going on?

Cheers
Contributor
Posts: 29

Re: Simple one hopefully - ODS excel XP tagset problem -

Posted in reply to deleted_user
Would you post the tabulate code please?
N/A
Posts: 0

Re: Simple one hopefully - ODS excel XP tagset problem -

ods tagsets.excelxp file='y:\Extract.xml' style=minimal ;

rsubmit;
proc tabulate data = miu;
class stat_typ umony;
table stat_typ, umony*(N*F=5.)
/rts =5 nocontinued;


run;
endrsubmit;

ods _all_ close;
Contributor
Posts: 29

Re: Simple one hopefully - ODS excel XP tagset problem -

Posted in reply to deleted_user
I noticed you don't have a var statement. Is umony your analysis variable?
N/A
Posts: 0

Re: Simple one hopefully - ODS excel XP tagset problem -

I didn't use a var statement - as the statistic required is N ie a simple count, which the proc defaults to if var is omitted.
Valued Guide
Posts: 2,177

Re: Simple one hopefully - ODS excel XP tagset problem -

Posted in reply to deleted_user
PBALL


problem is rsubmit

excelxp works only "locally"

you could create the xml on the remote server (put the ods tagsets statements inside the rsubmit block), and arrange "delivery" of the xml in any of a variety of ways, .
> rsubmit;
> ods tagsets.excelxp file="%SYSFUNC(PATHNAME(WORK))/Extract.xml" RS=NONE
> style=minimal ;
>
> proc tabulate data = miu;
> class stat_typ umony;
> table stat_typ, umony*(N*F=5.)
> /rts =5 nocontinued;
>
>
> run;
>
> ods _all_ close;
PROC DOWNLOAD INFILE= "%SYSFUNC(PATHNAME(WORK))/Extract.xml"
OUTFILE= 'y:\Extract.xml' ;
RUN ;
> endrsubmit;

UNFORTUNATELY, handling remote servers on z/OS is less easy to equate to remote server handling for unix or windows platforms, so the above is not good enoughif your remote server is on z/OS. (if you don't know the server platorm, check by submitting
rsubmit ; %put &sysscp &sysscpL &sysVLong ; endrsubmit ;



Alternatively, you could use remote library services to create your xml in the local session, like:

%let rserver = %sysfunc( getoption(remote)) ;
libname rwork remote slibref= work server= &rserver ;

> ods tagsets.excelxp file='y:\Extract.xml' style=minimal ;

proc tabulate data = RWORK.miu;

> class stat_typ umony;
> table stat_typ, umony*(N*F=5.)
> /rts =5 nocontinued;
>
>
> run;
>
> ods _all_ close;
LIBNAME RWORK ;
Ask a Question
Discussion stats
  • 5 replies
  • 232 views
  • 0 likes
  • 3 in conversation