BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

I got strange warning into the log file

 

WARNING: 'putvars' was compiled using a different version of SAS. This might result in unexpected behavior.
WARNING: 'title_footer_over_rides' was compiled using a different version of SAS. This might result in unexpected behavior.
WARNING: 'system_footer_setup' was compiled using a different version of SAS. This might result in unexpected behavior.
WARNING: 'newline' was compiled using a different version of SAS. This might result in unexpected behavior.

 

I think it could be associated to the piece of code below.   It does not like the style=minimal

 

ODS tagsets.ExcelXp file="/.../rapport/&CURYYYY./HlcnRecon&CURMONTH..xls"
    options (sheet_name='Summary') style=minimal;
    proc print data=SUMMARY NOOBS;
    run;

How to rapidly solve that issue?
I found style=sasweb but it is the best solution?

1 ACCEPTED SOLUTION

Accepted Solutions
Kathryn_SAS
SAS Employee

You can try using the CELLWIDTH= style attribute or the Absolute_column_width suboption in ODS EXCEL:

ODS EXCEL suboptions 

View solution in original post

15 REPLIES 15
Tom
Super User Tom
Super User

Is there a reason you are using ODS TAGSETS.EXCELXP instead of using the newer ODS EXCEL?

 

If you must use TAGSET.EXCELXP which version are you using?  When I try to use it in SAS ODA this is what the SAS lag says it is using.

 74         filename x temp;
 75         ods tagsets.excelxp file=x /* options(doc='version') */;
 NOTE: Writing TAGSETS.EXCELXP Body file: X
 NOTE: This is the Excel XP tagset (Compatible with SAS 9.1.3 and above,
 v1.131, 04/23/2015). Add options(doc='help') to the ods 
 statement for more information.

Does not look it has been enhanced in over 10 years.

alepage
Barite | Level 11

it is a good question.  It is an old program, I need to debug and if you think that it will be better to switch to ODS Excel and that will solve my issue, please let me know.

Could you please provide me the code example with ODS Excel please.

 

I have executed this script:

filename x temp;
 ods tagsets.excelxp file=x  options(doc='version') ;
 run;

log file:

 

NOTE: Writing HTML5(EGHTML) Body file: EGHTML
27
28 filename x temp;
29 ods tagsets.excelxp file=x options(doc='version') ;
NOTE: Writing TAGSETS.EXCELXP Body file: X
NOTE: This is the Excel XP tagset (Compatible with SAS 9.1.3 and above, v1.131, 04/23/2015). Add options(doc='help') to the ods
statement for more information.
30 run;

 

Tom
Super User Tom
Super User

The code you showed is not using very many ODS options, so it should translate directly.

 

Make sure to change the filename to use xlsx as the extension instead of xls.  Also note that the TAGSETS.EXCELXP does not actual generate an XLS file, it generates an XML file written in the style that Excel knows how to convert into an actual Excel workbook.

 

ODS EXCEL
  file="/.../rapport/&CURYYYY./HlcnRecon&CURMONTH..xlsx"
  options (sheet_name='Summary') style=minimal
;
proc print data=SUMMARY NOOBS;
run;
ODS EXCEL CLOSE;
ballardw
Super User

You should be able to use Proc Template to get the code for the define style and then recompile it with your current system.

 

I ran into some issues in the past with a custom Style that modified a SAS supplied style and when SAS was upgraded the definition of the same named style changed so that my custom style did not use the SAS style correctly.

 

This code will show the source code for the style Minimal in the log:

proc template;
   source Styles.minimal;
run;

You could copy that into the editor and recompile the style.

Note that I see this in my install's version of Minimal:

  style Document /
      doctype =
      "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 3.2 Final//EN"">"
      contenttype = "text/html"
      protectspecialchars = auto;

Which implies that style is intended to create HTML 3 documents which may cause an issue with the Tagset Excelxp. Creating a file with an XLS extension but applied to a different format of file is one of the things Microsoft has made unrelieable as well. 

The warning messages you show do not seem to apply to my version of Minimal so you may have to chase more things down to use that style and the tagset together. The putvars and newline sound more like table output requests than a general style and may indicate an interaction with the Proc Print default table settings and the minimal style as well.

 

alepage
Barite | Level 11
The SAS code you have provided
proc template;
   source Styles.minimal;
run;

The log file:

NOTE: Path 'Styles.Minimal' is in: SASHELP.TMPLMST.
30 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

Could you please provide me the step to solve the issue ?

Kathryn_SAS
SAS Employee

Have you tried ODS EXCEL? The ExcelXP tagset has not been updated in a while. I would try the following:

ods _all_ close;
ODS excel file="/.../rapport/&CURYYYY./HlcnRecon&CURMONTH..xlsx"
    options (sheet_name='Summary') style=minimal;

proc print data=SUMMARY NOOBS;
run;

ods excel close;
ods listing;

Does this work for you?

For additional suboptions, see the documentation: 

ODS EXCEL 

alepage
Barite | Level 11

I can try that and see if it works.  Is there a way to make sure it will recognized the style 'minimal'?

Because, it seems to work with SAS EG but when I execute the script via a terminal windows on the Linux server, no Excel file are produced

Any idea how to define / redefine the style mininal.  

it found it on SAS EG

end;
NOTE: Path 'Styles.Minimal' is in: SASHELP.TMPLMST.
30 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

Any suggestion before I switch to ods excel

 

Kathryn_SAS
SAS Employee

Try adding the following before your ODS EXCEL statement:

ods path reset;

ods path show;

If SAS cannot find a style that is specified, it should issue a Warning as shown below. The file should still be created using the default style.

1335  ODS excel file="c:\temp\test.xlsx"
1336      options (sheet_name='Summary') style=minimalx;
WARNING: Style MINIMALX not found; Excel style will be used instead.

If you continue to have problems, can you send your log?

alepage
Barite | Level 11
could you please recommand me a predefine style the ODS excel will recognize?
Kathryn_SAS
SAS Employee

ODS EXCEL uses Styles.Excel by default if you do not specify another STYLE= option. 

alepage
Barite | Level 11

How to avoid the text wrap ?   I have tried the options

ODS excel options(sheet_name='Legal Branch' FLOW='tables') ;
or

ODS excel options(sheet_name='Legal Branch' FLOW='none') ;

and it did not work.

 

 

Capture d’écran 2026-02-25 131010.png


Should have Paid Indemnity, Paid ALAE and so on.

 

But the replacement of ods tagset.excelxp for ods excel is definitively an improvement

Kathryn_SAS
SAS Employee

You can try using the CELLWIDTH= style attribute or the Absolute_column_width suboption in ODS EXCEL:

ODS EXCEL suboptions 

alepage
Barite | Level 11
this option did not solve the wrap text issue

Thank you very much for your help
At least, I am able to produce the requested excel files
Tom
Super User Tom
Super User

Those look like column headers produced by something like PROC REPORT.

It might help if you provide an small example dataset and the reporting code so other's can experiment with trying to prevent PROC REPORT from wrapping the column headers.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 15 replies
  • 1592 views
  • 1 like
  • 4 in conversation