BookmarkSubscribeRSS Feed
karachi007
Calcite | Level 5

2Qs; 1. How do I export output data? and search on the output data columns I'm new to SAS studio. Please advise

11 REPLIES 11
Reeza
Super User

Right click the data set in your library and select Export.

Write a PROC EXPORT statement.

Use a Task to write the export code for you.

 


@karachi007 wrote:

2Qs; 1. How do I export output data? and search on the output data columns I'm new to SAS studio. Please advise


 

karachi007
Calcite | Level 5
no luck
Reeza
Super User

What did you do and what does that mean?

 


@karachi007 wrote:
no luck

 

karachi007
Calcite | Level 5

this is my export code still getting errors:

proc export data=work.import DBMS=xlsx

outfile= "/Program Files/SASUniversityEdition/myfolders/wf.xlsx";

run;

 

error;

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 proc export data=work.import DBMS=xlsx
72
73 outfile= "/Program Files/SASUniversityEdition/myfolders/wf.xlsx";
74
75 run;
 
ERROR: Temporary file for XLSX file can not be created -> /Program Files/SASUniversityEdition/myfolders//wf.$$1. Make sure the
path name is correct and that you have write permission.
 
Reeza
Super User

The path has to start with the '/folders/myfolders/' portion because it's not running off your computer, it's running on a virtual machine that's on your computer and the path is different. 

 

Try the exact code I posted. Then change things one at a time and see what you can get.

 


@karachi007 wrote:

this is my export code still getting errors:

proc export data=work.import DBMS=xlsx

outfile= "/Program Files/SASUniversityEdition/myfolders/wf.xlsx";

run;

 

error;

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 proc export data=work.import DBMS=xlsx
72
73 outfile= "/Program Files/SASUniversityEdition/myfolders/wf.xlsx";
74
75 run;
 
ERROR: Temporary file for XLSX file can not be created -> /Program Files/SASUniversityEdition/myfolders//wf.$$1. Make sure the
path name is correct and that you have write permission.
 

 

karachi007
Calcite | Level 5

right click on the data set and export but I don't see any code for export

Reeza
Super User

You won't see code but you can save it via point and click.

 

What format are you trying to export it to? 

Here's a video on CSV exports.

https://video.sas.com/detail/video/4664327156001/reading-and-generating-csv-files-using-snippets-in-...

 

Page 102 in the User Guide:

http://documentation.sas.com/api/docsets/webeditorug/3.7/content/webeditorug.pdf?locale=en

 

proc export out=sashelp.class datafile="/folders/myfolders/demo.xlsx" dbms=xlsx replace; run;

@karachi007 wrote:

right click on the data set and export but I don't see any code for export


 

karachi007
Calcite | Level 5

this is the code and error. I'm trying to export in xlsx.

 

 

proc export data=work.import DBMS=xlsx

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

run;

 
ERROR: Temporary file for XLSX file can not be created -> /folders/myfolders//thesis.$$1. Make sure the path name is correct and
that you have write permission.
 

sx

Reeza
Super User

I'm assuming you're using SAS UE, is that correct?

Did you set up the myfolders folder as per the installation guide/instructions?

 

If so, navigate to the folder under Servers Folders pane and right click it and verify the path. If you didn't set it up, you'll need to add it in your VM settings.

 

Also please post the exact code and log.

 


@karachi007 wrote:

this is the code and error. I'm trying to export in xlsx.

 

 

proc export data=work.import DBMS=xlsx

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

run;

 
ERROR: Temporary file for XLSX file can not be created -> /folders/myfolders//thesis.$$1. Make sure the path name is correct and
that you have write permission.
 

sx


 

karachi007
Calcite | Level 5

I'm using SAS® OnDemand for Academics

Reeza
Super User

Ok. Then you need to find the path to a folder you can export to, same idea as before go to server panes and folders. Export to one of the paths you have. Then you need to right click the file to download it to your local machine, since everything in SAS AoD is in the cloud.

 


@karachi007 wrote:

I'm using SAS® OnDemand for Academics


 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 11 replies
  • 1154 views
  • 0 likes
  • 2 in conversation