Learning SAS? Welcome to the exclusive online community for all SAS learners.

Excel Export Issue

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Excel Export Issue

Hello all,

Recently I've been expirencing errors when trying to export SAS files into excel sheets.

I'm new to SAS, so don't know much about its coding. After checking resources, I finally got this code:

proc export data=myfolder.tucson_locations DBMS=xlsx

     outfile="/folders/myfolders/TucsonLocations.xlsx";

run;

After running the code, it keeps giving me this error message, as you can see from the screenshot I've attached.

ERROR: An exception has been encountered.

Please contact technical support and provide them with the following traceback information:

 

The SAS task name is [EXPORT (]

Segmentation Violation

 

Traceback of the Exception:

 

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sas() [0x52805e]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sas() [0x41f08e]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/tkmk.so(bkt_signal_handler+0x144) [0x7f1afb27e5d4]

/lib64/libpthread.so.0(+0xf710) [0x7f1afc4a1710]

/opt/sasinside/SASHome/SASFoundation/9.4/dbcs/sasexe/sasyh(yhlalia+0x20) [0x7f1aea70aa20]

/opt/sasinside/SASHome/SASFoundation/9.4/dbcs/sasexe/sasyh(yyhrc+0x39) [0x7f1aea6fce59]

/opt/sasinside/SASHome/SASFoundation/9.4/dbcs/sasexe/sasyh(yyorc+0x3dc) [0x7f1aea705a9c]

/opt/sasinside/SASHome/SASFoundation/9.4/dbcs/sasexe/sasyoio(yyoopen+0x8ca) [0x7f1aa9fe8d8a]

/opt/sasinside/SASHome/SASFoundation/9.4/dbcs/sasexe/sasyoio(yoopen+0x1b9) [0x7f1aa9fe8119]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sasimctr(cdsdata+0x1ac) [0x7f1a91357c7c]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sasimctr(exportf+0x299) [0x7f1a91357a49]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sasimctr(parsexe+0x19c) [0x7f1a9135509c]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sasexpor(sasexpor+0x126) [0x7f1a91dfa0f6]

/opt/sasinside/SASHome/SASFoundation/9.4/sasexe/sas(vvtentr+0x101) [0x41eca1]

/lib64/libpthread.so.0(+0x79d1) [0x7f1afc4999d1]

/lib64/libc.so.6(clone+0x6d) [0x7f1afbb27b5d]

i've searched everywhere but had no luck, would someone help me please? I'm using the University edition.


Thank you in advance !


Ran


Screenshot.jpg

Accepted Solutions
Solution
‎04-13-2015 04:56 PM
Super User
Posts: 11,343

Re: Excel Export Issue

Do you have a LIBRARY named myfolder?

When you use data=myfolder.tucson_locations then SAS is looking for a dataset named tucson_locations in a Library named myfolder.

The example Reeza provided was using a SAS supplied Library.Dataset. If you didn't have a library named myfolder then SAS encountered an error though it should have generated a message data myfolder.tucson_locations doesn't exist.

View solution in original post


All Replies
Super User
Posts: 19,815

Re: Excel Export Issue

I would recommend contact sasanalyticsu@sas.com - tech support for SAS Analytics U as recommended.

Also, what happens after you

1) Restart your VM

2) Run the following and see if it works

proc export data=sashelp.class DBMS=xlsx

     outfile="/folders/myfolders/Class.xlsx";

run;

New Contributor
Posts: 4

Re: Excel Export Issue

Hi Reeza,

The code you provided works. An excel file was created successfully. So what do you think the problem could be?

Thank you for the help!

Ran

Solution
‎04-13-2015 04:56 PM
Super User
Posts: 11,343

Re: Excel Export Issue

Do you have a LIBRARY named myfolder?

When you use data=myfolder.tucson_locations then SAS is looking for a dataset named tucson_locations in a Library named myfolder.

The example Reeza provided was using a SAS supplied Library.Dataset. If you didn't have a library named myfolder then SAS encountered an error though it should have generated a message data myfolder.tucson_locations doesn't exist.

New Contributor
Posts: 4

Re: Excel Export Issue

Hi ballardw,

I haven't created a LIBARY called myfolder. I assume it is the shared folder that I created in the VM. If I need an additional step to set the folder as a library, what code do I need to put?

The path of myfolders on my computer is: D:\SASUniversityEdition\myfolders

Thank you !

New Contributor
Posts: 4

Re: Excel Export Issue

Hi all,

the problem has been solved after I set the library. Thank you so much ballardw for the awesome reminder. Here is the code that I used in case someone is interested:

libname myfolder "/folders/myfolder'


proc export data=myfolder.aaa DBMS=xlsx

     outfile="/folders/myfolders/aaa.xlsx";

run;

Thank you again for the kind help !

Hava a nice day !

Community Manager
Posts: 583

Re: Excel Export Issue

Glad this community was able to help you on your way! Would you be willing to mark the question as answered and select "correct" or "helpful" answer in the comment thread? That will make it easier for other users to find info that may help them. Thank you!

-
Bev Brown
Visit me on LinkedIn.
Twitter too: @BevBrown
Thank you for using SAS.jpg
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 914 views
  • 0 likes
  • 4 in conversation