The SAS Output Delivery System and reporting techniques

Windows themes and ODS styles

Reply
N/A
Posts: 0

Windows themes and ODS styles

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
N/A
Posts: 0

Re: Windows themes and ODS styles

Posted in reply to deleted_user
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
SAS Employee
Posts: 174

Re: Windows themes and ODS styles

Posted in reply to deleted_user
Have you seen this documentation?

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

-- David Kelley, SAS
N/A
Posts: 0

Re: Windows themes and ODS styles

Posted in reply to David_SAS
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
N/A
Posts: 0

Re: Windows themes and ODS styles

Posted in reply to deleted_user
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 :-)
SAS Employee
Posts: 95

Re: Windows themes and ODS styles

Posted in reply to deleted_user
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...
Ask a Question
Discussion stats
  • 5 replies
  • 169 views
  • 0 likes
  • 3 in conversation