BookmarkSubscribeRSS Feed
weizhongma
Calcite | Level 5

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.

6 REPLIES 6
Jagadishkatam
Amethyst | Level 16

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
Reeza
Super User

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

Jagadishkatam
Amethyst | Level 16

@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
Reeza
Super User

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.

weizhongma
Calcite | Level 5

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 6 replies
  • 1175 views
  • 0 likes
  • 3 in conversation