BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Programmer26
Calcite | Level 5
Hi All,

I am using Ods excel to create a excel report but i am getting this error instead(mentioned in the subject line).
The code i am using is
Ods excel file= filepath/abc.xlsx style=htmlblue
Options(sheet_name=xyz);
Proc print data=test;
Run;
Ods excel(sheet_name=xyz1);
Proc print data=test2;
Run;
Ods excel close;
I tried using the memsize=max option but the option is throwing a warning " Option memsize should be used at the start of the sas system. Option ignored.
I relaunched the session but the same result.

Kindly help me out on this.
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

@Programmer26 wrote:
Observations=220k
Vars=6

That's WAY beyond what constitutes a report. Run a simple export using a LIBNAME:

libname myex xlsx "filepath/abc.xlsx";

data myex.xyz;
set test;
run;

data myex.xyz1;
set test2;
run;

libname myex clear;

ODS EXCEL will add all the formatting tags for every cell, which are not necessary when exporting just data.

Since that needs to be kept as text (XML) in memory before the compressed file is written, you run out of memory.

View solution in original post

7 REPLIES 7
Kurt_Bremser
Super User

@Programmer26 wrote:
Observations=220k
Vars=6

That's WAY beyond what constitutes a report. Run a simple export using a LIBNAME:

libname myex xlsx "filepath/abc.xlsx";

data myex.xyz;
set test;
run;

data myex.xyz1;
set test2;
run;

libname myex clear;

ODS EXCEL will add all the formatting tags for every cell, which are not necessary when exporting just data.

Since that needs to be kept as text (XML) in memory before the compressed file is written, you run out of memory.

Programmer26
Calcite | Level 5
Kurt,
When i am using the code as you mentioned it is throwing a error stating
Could not find 'workbook.xml.rels'
Error: file myex.xyz does not exist.
Kurt_Bremser
Super User

I guess you have a damaged xlsx file. Make sure that it does not exist before you issue the LIBNAME.

After deleting the file, please run the code again and post the whole log using the </> button.

Programmer26
Calcite | Level 5
Thank you Kurt.
I checked and there were multiple files stored by the same name in that folder.
It is working fine now.

Thank you for the help!! 🙂

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2775 views
  • 0 likes
  • 2 in conversation