BookmarkSubscribeRSS Feed
ajsivsan
Calcite | Level 5

Hi,

I successfully created a multisheet excel with the help of various resources available in SAS support website. While i was formatting the look of the output i am facing a difficulty.

In the below picture i was not able to generate the AAAA row. Any ideas would be very helpful. I tried the title option but not able to change the title styles and also it is giving an additional one line gap. Please let me know how i can achieve the below format. I am very much new to SAS.

excel.jpg

8 REPLIES 8
Haikuo
Onyx | Level 15

Is this what you want? Title will automatically take two rows though:

ods listing close;

ods tagsets.excelxp

file="c:\temp\test.xml"

;

title "aaaa";

ods tagsets.excelxp

options ( embedded_titles ='yes'

);

proc print data=sashelp.class;

run;

ods tagsets.excelxp close;

ods listing;

Haikuo

ajsivsan
Calcite | Level 5

Hi Hai.ko,

I tried title 'AAAAA' but i am not sure how to change the style of the title element. If you know how to control the style of the title i would be happy to use that in my code.

Haikuo
Onyx | Level 15

Here is quick reference link, maybe you can find something that you can use.

http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_help.html

Haikuo

ajsivsan
Calcite | Level 5

Thanks haiko...

And do you know how to change style for the titles????

Haikuo
Onyx | Level 15

Well, if the present factory styles can't meet your need, you probably need to create your own style. And this topic is too big to be addressed in several sentences. Please do a search on proc template and ODS styles.

Haikuo

Also, although 'options' seem to be universal, 'styles' are not. You would only see them working on  proc print, report and tabulate. So you are using something else other than these 3 procs to output, forget about styles.

SteveNZ
Obsidian | Level 7

Could do what you want relatively easy using Proc Report as opposed to Proc Print. More ability to control each element of output including the AAAA row.

ajsivsan
Calcite | Level 5

Hi SteveNZ,

If you have a simple easily understandable example please share it with me.

ajsivsan
Calcite | Level 5

Hi,

There is a way to remove the space below the title.

ODS TAGSETS.EXCELXP OPTIONS(EMBEDDED_TITLES='YES'

EMBEDDED_FOOTNOTES='YES' skip_space='0,0,0,0,0');

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