Problem Note 63893: The error "In event 'text_run': bad argument #2 to 'format' (string expected, got nil)" appears after you use the FREQ procedure with ODS EXCEL
The following error appears in the SAS® log under certain conditions when you use the ODS EXCEL destination with PROC FREQ:
ERROR: In event 'text_run': bad argument #2 to 'format' (string expected, got nil)
After the error occurs, the generated Microsoft Excel file can be corrupted and does not open.
The particular conditions are as follows:
- The Excel file that you are creating generates crosstabs.
- You add a user-defined format for a value.
- The user-defined format starts with the dollar symbol ($).
Here is an example of the syntax that causes this problem:
proc format;
value test 11="$11";
run;
ods excel file="c:\scratch\test.xlsx";
proc freq data=sashelp.class;
format age test.;
table age*height;
run;
ods excel close;
There is no workaround.
A fix for this issue is planned for a future software release.
Operating System and Release Information
| SAS System | Base SAS | z/OS | 9.4_M3 | | 9.4 TS1M3 | |
| z/OS 64-bit | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft® Windows® for x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8 Enterprise 32-bit | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8 Enterprise x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8 Pro 32-bit | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8 Pro x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8.1 Enterprise x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8.1 Pro 32-bit | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 8.1 Pro x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows 10 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2008 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2008 R2 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2008 for x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2012 Datacenter | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2012 R2 Datacenter | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2012 R2 Std | 9.4_M3 | | 9.4 TS1M3 | |
| Microsoft Windows Server 2012 Std | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Enterprise 32 bit | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Enterprise x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Home Premium 32 bit | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Home Premium x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Professional 32 bit | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Professional x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Ultimate 32 bit | 9.4_M3 | | 9.4 TS1M3 | |
| Windows 7 Ultimate x64 | 9.4_M3 | | 9.4 TS1M3 | |
| 64-bit Enabled AIX | 9.4_M3 | | 9.4 TS1M3 | |
| 64-bit Enabled Solaris | 9.4_M3 | | 9.4 TS1M3 | |
| HP-UX IPF | 9.4_M3 | | 9.4 TS1M3 | |
| Linux for x64 | 9.4_M3 | | 9.4 TS1M3 | |
| Solaris for x64 | 9.4_M3 | | 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: | 2019-04-01 10:11:19 |
| Date Created: | 2019-03-22 10:06:14 |