BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I work with SAS enterprise guide 7.13 

I am trying to write ods excel code and I get an error

ERROR: Unable to load module 'SpreadsheetML' from template store!
ERROR: No body file. EXCEL output will not be created.

ods excel file="/path/yourfilename.xlsx";
proc freq data=sashelp.class;
  tables age;
run;
proc freq data=sashelp.class;
  tables sex;
run;
ods excel close;
3 REPLIES 3
Sajid01
Meteorite | Level 14

I have just tested your code in SAS Studio

It works.
The log is shown below :

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 ods excel file="/folders/myfolders/Excel/test_01JAN2019.xlsx";
76 proc freq data=sashelp.class;
77 tables age;
78 run;
 
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.12 seconds
cpu time 0.10 seconds
 
 
79 proc freq data=sashelp.class;
80 tables sex;
81 run;
 
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.05 seconds
 
 
82 ods excel close;
NOTE: Writing EXCEL file: /folders/myfolders/Excel/test_01JAN2019.xlsx
83
84 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
97

 

 

Reeza
Super User

ODS EXCEL is pre-production from SAS 9.4 M1/M2.

It is production as of M3, but still has some bugs. In M5, the version I work with, most bugs are gone and it works decently. 

 

I suspect your version is too old. This will tell you your SAS version in the log. 

 

proc product_status;run;

@Ronein wrote:

Hello

I work with SAS enterprise guide 7.13 

I am trying to write ods excel code and I get an error

ERROR: Unable to load module 'SpreadsheetML' from template store!
ERROR: No body file. EXCEL output will not be created.

ods excel file="/path/yourfilename.xlsx";
proc freq data=sashelp.class;
  tables age;
run;
proc freq data=sashelp.class;
  tables sex;
run;
ods excel close;

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 1446 views
  • 0 likes
  • 4 in conversation