BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello there,

I wrote a Windows-based program that would 'simplify' (I hope) the use of ExcelXP tagset to create a multi-sheet Excel spreadsheetML XML (--based on a SUGI31 paper by Vincent DelGobbo). One feature I've been trying to implement is the ability to set an ODS style based on a selected Windows theme file. Unfortunately, the code generated by the program doesn't seem to work, and I suspect the culprit lies in the ODS path statement. I would appreciate it very much if someone could take a look at the generated SAS program code when the option to create a custom ODS style based on a Windows theme is selected. The program can be downloaded at:

http://sas2themax.com/beta/

Any ideas or help will be greatly appreciated.

Thanks, Audi
5 REPLIES 5
deleted_user
Not applicable
I just saw one flaw in the generated SAS code -- the keyword "styles' is incorrectly added to the ODS path statement, and incorrectly implies a library location. But deleting this keyword and re-running the program still doesn't work.

Any ideas would be greatly appreciated.

Thanks, Audi
David_SAS
SAS Employee
Have you seen this documentation?

http://support.sas.com/rnd/base/topics/odsstyles/thm2tpl.html

-- David Kelley, SAS
deleted_user
Not applicable
Hi David,

Thanks. Actually, that's where I picked up the idea. 🙂

I've examined the log file after fixing the flaw in the generated ODS path statement. There's a couple of WARNINGs I had to contend with:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: The infile "C:\Windows\Resources\Themes\aero.theme" is:
File Name=C:\Windows\Resources\Themes\aero.theme,
RECFM=V,LRECL=256

NOTE: 65 records were read from the infile "C:\Windows\Resources\Themes\aero.theme".


WARNING: Apparent invocation of macro SYSTEMROOT not resolved.
...
NOTE: Overwriting existing template/link: Styles.Aero
NOTE: STYLE 'Styles.Aero' has been saved to: SASUSER.TEMPLAT
...
6493 ods tagsets.ExcelXP path="&MYDIR" file='output.xml' style=styles.aero;
WARNING: Could not locate style reference 'default.theme("CSS")'.
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I tried to edit the generated 'aero.tpl' file and removed lines/paths that contain the keyword 'SYSTEMROOT'. I then included a proc template statement to include this edited *.tpl file. The first WARNING disappeared, but the second one persists.

Do I need an updated ExcelXP tagset file? The one I used was released June 2006.

Thanks in advance for any ideas or help.

Regards, Audi
deleted_user
Not applicable
I've come to conclusion that themes-to-ODS-styles is not a good idea when using the ExcelXP tagset. The two are simply not compatible.

Please disregard this thread.

Thanks and I'm out, Audi 🙂
Eric_SAS
SAS Employee
I feel the need to add something here. One of the big problems with Excel and styles is that Excel is very limited in it's abilities to handle anything
very complex. More than 16 colors for example. Or table borders, frames
or rules of any kind. Part of this is the design of Excel. Part of it is just
its built in limitations.

It could use a style converted from a windows theme.
But those themes often have nice color schemes that are too close in tone to each other for them to map correctly into Excel. A prime example of this is the default ods style which is two tone grey. It's not particularly pretty, nor is it offensive. In Excel, those two shades of grey are the same because Excel doesn't have enough colors to go around. It doesn't get either grey right. The grey it does have is somewhere in between.

When using other colors the results can be hideous. Blues become purple,
cyan can be green. It is almost never what you would want or expect.

Excel 2007 should help with that. It's supposed to have millions of colors.
I hope it has more than just more colors...

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
  • 737 views
  • 0 likes
  • 3 in conversation