Can not use ods tagsets.excelxp to output all tables in Excel worksheet

Reply
Occasional Contributor
Posts: 15

Can not use ods tagsets.excelxp to output all tables in Excel worksheet

Here is my script. I want to output to Excel and put all tables in one worksheet. So I used option of sheet_interval = 'none". However the final output is still in multiple worksheets. Could you help me to know what is the reason? In addition, it does not show my output in "mis1" too. Looks like that the output does not follow the options. In the log, you will see Experimental Excel XP tagset. Each table created will go in its own worksheet. Does anyone encounter the same issue before? Thanks!

ods tagsets.excelxp file='c:\Weizhong\work1\mis.xls'                    

options(sheet_interval='none' sheet_name='mis1');
   
PROC FREQ DATA = weiz.mis;

TABLES band_aum band_rev;
RUN;

PROC FREQ DATA = weiz.mis;
TABLES band_rev_:;
RUN; 
ods tagsets.excelxp close;

ods tagsets.excelxp file='c:\Weizhong\work1\mis.xls'

options(sheet_interval='none' sheet_name='mis1');

NOTE: Writing TAGSETS.EXCELXP Body file: c:\Weizhong\work1\mis.xls

NOTE: Experimental Excel XP tagset. Each table created will go in its own worksheet.

Trusted Advisor
Posts: 1,128

Re: Can not use ods tagsets.excelxp to output all tables in Excel worksheet

Hi,

Instead of using sheet_interval='none', please use 'page' like below, this will produce the xml file with all the tables in one worksheet with name mis1.

options(sheet_interval='page' sheet_name='mis1');


Thanks,

Jagadish

Thanks,
Jag
Super User
Posts: 17,823

Re: Can not use ods tagsets.excelxp to output all tables in Excel worksheet

What version of the tagsets do you have? It says experimental in the note above, but not sure if you added that in or if its from the log.

You can download and use the latest version from here:

Base SAS: ODS MARKUP

Trusted Advisor
Posts: 1,128

Re: Can not use ods tagsets.excelxp to output all tables in Excel worksheet

@Reeza, i have mimicked the same code on a sample dataset in sasversion 9.2 and i did not get any note related to the experimental excel xp tagset.

Also i believe tagsets.excelxp is already there in sas and there is no need to add it, please suggest

Thanks,

Jagadish

Thanks,
Jag
Occasional Contributor
Posts: 15

Re: Can not use ods tagsets.excelxp to output all tables in Excel worksheet

Thanks! I am using 9.1.3.

Super User
Posts: 17,823

Re: Can not use ods tagsets.excelxp to output all tables in Excel worksheet

Tagsets get updated and you can manually update them. I'm not sure if patches/fixes are updated, and typically the version that comes with SAS is outdated.

Both of you can get the update from the link above and update your tagsets version.

Follow the instructions on the page.

Occasional Contributor
Posts: 15

Re: Can not use ods tagsets.excelxp to output all tables in Excel worksheet

It is from original log. I did not add any.

Ask a Question
Discussion stats
  • 6 replies
  • 808 views
  • 0 likes
  • 3 in conversation