BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jaheuk
Obsidian | Level 7


dear all,

program belows runs for months with the expected result!

NOW, I suddenly have NO style anymore (i.e. yellow in the background).

In fact if I choose another style, there is not much changing!!

Is there something wrong with my installation or settings??

Screenshot - 25_07_2012 , 9_41_32.png

Regards,

Herman

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi --

  Changing from 9.2 to 9.3 would be a difference, but the change would be from the gray and blue default colors of 9.2 and STYLES.DEFAULT to the new white and light blue colors of STYLES.HTMLBLUE instead of SEASIDEPRINTER style. So, in 9.2, if SEASIDEPRINTER suddenly was not available, then STYLES.DEFAULT would be used; in 9.3, if SEASIDEPRINTER was not available, then STYLES.HTMLBLUE would be used.

  But I just noticed this statement in the OP (highlighting mine):

ods html file="\\....\HU.xls" rs=none style=seasideprinter;

The file extension is .xls -- which is a trick to fool the Windows registry into launching Excel. Microsoft is pretty good about opening HTML files (which is what ODS HTML is really creating). I wonder whether some setting changed. When version 8.2 was active, the "flavor" of HTML created was HTML 3.2 -- and all the style information was embedded in the HTML tags. Microsoft liked HTML 3.2. When SAS version 9.x came out, the default "flavor" of HTML created was HTML 4.0 -- and all the style information was embedded in an inline <STYLE> section that Microsoft didn't like. Microsoft didn't like HTML 4.0 so much, that for Office 2000, they designed their own "flavor" of HTML tags, and their own version of an inline style. There was a registry switch that you could set that told SAS whether to create HTML 3.2 or HTML 4.0 when the simple ODS HTML statement was used. SAS/IntrNet folks used to do that switch with the registry a lot because most web servers at the time were happier with HTML 3.2 and nobody wanted to change their programs.

  So, another thing that the OP could try would be:

ods html3 file="\\....\HU.xls" rs=none style=seasideprinter;

 

and see whether Excel is happier with the file when this destination is explicitly used (ODS HTML3 explicitly creates HTML 3.2 tags). If that works (and seasideprinter is used inside Excel when the HTML file is rendered), then that says the item store is still OK. In fact, I forgot to suggest that you could just look inside the HTML file with Notepad and look for the inline style section. If some of the colors and fonts look the same as those in SEASIDEPRINTER style, then that's another clue that the item store is OK.

Also, I thought about it and the problem could be with Excel -- perhaps there was a recent upgrade to Excel that caused the HTML inline style section to be ignored.

If you use either of these invocations, Excel generally "likes" the type of style information created by either of these destinations (because both produce Microsoft "flavor" of HTML):

ods msoffice2k file="\\....\HU.xls" rs=none style=seasideprinter;

ods tagsets.msoffice2k_x file="\\....\HU.xls" rs=none style=seasideprinter;

Excel likes the type of style section created by msoffice2k and msoffice2k_x -- so these might open better, especially with Excel 2007 or 2010.

cynthia

View solution in original post

4 REPLIES 4
Andre
Obsidian | Level 7

Jaheuk,

Please apply those two instructions in order to see what is happening

under your non-windows environment  ( i guess from rs=none).

ods path show;

ods path reset;

Andre

Cynthia_sas
SAS Super FREQ

Hi:

  In addition to Andre's suggestions, it might be helpful to see what version of SAS you are running:

%put version= &sysvlong4;

%put system= &sysscpl;

will write the long information on your version and system into the log.

  Also useful would be knowing what changed? Upgrade 9.2 to 9.3?  Did you start using Enterprise Guide after using batch jobs? Did the location of your template directory get changed? On Windows & Unix, you can search for the SASHELP.TMPLMST item store by searching for the TMPLMST.SAS7BITM file.

  Or, you may want to open a track with Tech Support and go through a more organized debugging process. Usually, a program that's been working does not stop working unless something has changed -- either in the SAS install or in the location of the needed files, like the SASHELP item store or the SAS Registry. Tech Support is the better choice for help in this type of question.

cynthia

ChrisNZ
Tourmaline | Level 20

Jaheuk,

Sas have decided to change some default styles between 9.2 and 9.3 for some unfathomable reason.

A long shot, but could that be the cause?


Cynthia_sas
SAS Super FREQ

Hi --

  Changing from 9.2 to 9.3 would be a difference, but the change would be from the gray and blue default colors of 9.2 and STYLES.DEFAULT to the new white and light blue colors of STYLES.HTMLBLUE instead of SEASIDEPRINTER style. So, in 9.2, if SEASIDEPRINTER suddenly was not available, then STYLES.DEFAULT would be used; in 9.3, if SEASIDEPRINTER was not available, then STYLES.HTMLBLUE would be used.

  But I just noticed this statement in the OP (highlighting mine):

ods html file="\\....\HU.xls" rs=none style=seasideprinter;

The file extension is .xls -- which is a trick to fool the Windows registry into launching Excel. Microsoft is pretty good about opening HTML files (which is what ODS HTML is really creating). I wonder whether some setting changed. When version 8.2 was active, the "flavor" of HTML created was HTML 3.2 -- and all the style information was embedded in the HTML tags. Microsoft liked HTML 3.2. When SAS version 9.x came out, the default "flavor" of HTML created was HTML 4.0 -- and all the style information was embedded in an inline <STYLE> section that Microsoft didn't like. Microsoft didn't like HTML 4.0 so much, that for Office 2000, they designed their own "flavor" of HTML tags, and their own version of an inline style. There was a registry switch that you could set that told SAS whether to create HTML 3.2 or HTML 4.0 when the simple ODS HTML statement was used. SAS/IntrNet folks used to do that switch with the registry a lot because most web servers at the time were happier with HTML 3.2 and nobody wanted to change their programs.

  So, another thing that the OP could try would be:

ods html3 file="\\....\HU.xls" rs=none style=seasideprinter;

 

and see whether Excel is happier with the file when this destination is explicitly used (ODS HTML3 explicitly creates HTML 3.2 tags). If that works (and seasideprinter is used inside Excel when the HTML file is rendered), then that says the item store is still OK. In fact, I forgot to suggest that you could just look inside the HTML file with Notepad and look for the inline style section. If some of the colors and fonts look the same as those in SEASIDEPRINTER style, then that's another clue that the item store is OK.

Also, I thought about it and the problem could be with Excel -- perhaps there was a recent upgrade to Excel that caused the HTML inline style section to be ignored.

If you use either of these invocations, Excel generally "likes" the type of style information created by either of these destinations (because both produce Microsoft "flavor" of HTML):

ods msoffice2k file="\\....\HU.xls" rs=none style=seasideprinter;

ods tagsets.msoffice2k_x file="\\....\HU.xls" rs=none style=seasideprinter;

Excel likes the type of style section created by msoffice2k and msoffice2k_x -- so these might open better, especially with Excel 2007 or 2010.

cynthia

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1446 views
  • 0 likes
  • 4 in conversation