Problem Note 53819: A file generated with the ExcelXP tagset might display an incorrect font or might not open successfully in Microsoft Excel
A file that is created with the ExcelXP tagset might not use the correct font when the file is opened in Microsoft Excel. The file might also not open successfully in Excel. These issues might occur when an invalid font list is added to the file by the tagset.
A default font list might be added to the file if a specific font is not requested within the style template that is used. Excel does not recognize the format of this font list, in which the font names are separated by commas. Excel then uses a default font for the file.
The default font list that is added to the file is based on the current setting of the LOCALE system option. If this font list is greater than 31 characters long, a dialog box error also occurs indicating a problem with the style. This prevents the file from opening successfully.
To circumvent the problem, create a custom style using the TEMPLATE procedure and replace the fonts in the Fonts style element for the various parts of the output. An example is shown below.
proc template;
define style Styles.NewStyle;
parent=styles.default;
class fonts
"Fonts used in the default style" /
'TitleFont2' = ("Arial",4,bold italic)
'TitleFont' = ("Arial, Helvetica, sans-serif",5,bold italic)
'StrongFont' = ("Arial",4,bold)
'EmphasisFont' = ("Arial",3,italic)
'FixedEmphasisFont' = ("Arial",2,italic)
'FixedStrongFont' = ("Arial",2,bold)
'FixedHeadingFont' = ("Courier",2)
'BatchFixedFont' = ("Courier",2)
'FixedFont' = ("Courier",2)
'headingEmphasisFont' = ("Arial",4,bold italic)
'headingFont' = ("Arial",4,bold)
'docFont' = ("Arial",3);
end;
run;
ods tagsets.ExcelXP file="c:\temp.xml" style=styles.NewStyle;
proc print data=sashelp.class;
run;
ods tagsets.ExcelXP close;
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | 9.4 TS1M3 |
Z64 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | 9.4 TS1M3 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.4 TS1M3 |
HP-UX IPF | 9.3 TS1M0 | 9.4 TS1M3 |
Linux | 9.3 TS1M0 | 9.4 TS1M3 |
Linux for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Solaris for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2014-08-19 10:55:17 |
Date Created: | 2014-08-04 06:56:59 |