Problem Note 57620: The text format is ignored when it is passed using the TAGATTR= attribute with the ODS Destination for Excel
Passing the text format using the TAGATTR= attribute is not honored with the ODS Destination for Excel. The value is displayed using Excel's General format.
Instead of using the text format to treat values as a string, the data type of the cell can be modified. Changing it to a String should provide the same functionality.
Below is an example of overriding the style in PROC PRINT, adding the text format for the variable Format. This is not honored and therefore omits the leading zero. The data type is modified to String for the variable Type, which maintains the leading zero.
data one;
format=012345;
type=023456;
format format type z6.;
run;
ods excel file="c:\temp.xlsx";
proc print data=one;
var format / style(data)={tagattr="format:@"};
var type / style(data)={tagattr="type:String"};
run;
ods excel close;
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.4 TS1M3 | |
z/OS 64-bit | 9.4 TS1M3 | |
Microsoft® Windows® for x64 | 9.4 TS1M3 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M3 | |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8 Pro x64 | 9.4 TS1M3 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M3 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M3 | |
Microsoft Windows 10 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 R2 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M3 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M3 | |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Std | 9.4 TS1M3 | |
Windows 7 Enterprise 32 bit | 9.4 TS1M3 | |
Windows 7 Enterprise x64 | 9.4 TS1M3 | |
Windows 7 Home Premium 32 bit | 9.4 TS1M3 | |
Windows 7 Home Premium x64 | 9.4 TS1M3 | |
Windows 7 Professional 32 bit | 9.4 TS1M3 | |
Windows 7 Professional x64 | 9.4 TS1M3 | |
Windows 7 Ultimate 32 bit | 9.4 TS1M3 | |
Windows 7 Ultimate x64 | 9.4 TS1M3 | |
64-bit Enabled AIX | 9.4 TS1M3 | |
64-bit Enabled Solaris | 9.4 TS1M3 | |
HP-UX IPF | 9.4 TS1M3 | |
Linux for x64 | 9.4 TS1M3 | |
Solaris for x64 | 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: | 2016-03-18 13:30:17 |
Date Created: | 2016-02-10 11:48:00 |