BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ybz12003
Rhodochrosite | Level 12

Hi, all:

 

I'm currently using SAS 9.3 version.   I would like to export my SAS data to Excel format (.xls or .xlsx), not CSV format.  Please help, thanks.

 

Y

1 ACCEPTED SOLUTION

Accepted Solutions
JediApprentice
Pyrite | Level 9

Use proc export:

 

proc export 
  data=dataset
  dbms=xlsx
  outfile="C:\temp\myfile.xlsx"
  replace;
run;

View solution in original post

3 REPLIES 3
JediApprentice
Pyrite | Level 9

Use proc export:

 

proc export 
  data=dataset
  dbms=xlsx
  outfile="C:\temp\myfile.xlsx"
  replace;
run;
Kurt_Bremser
Super User

You will have a much easier life in the future if you use an open, textual format for the data transfer (as long as you only do that; for reports with formatting ODS TAGSETS.EXCELXP is of course the way to go).

Why do I say that?

MS is prone to make changes in their formats and how Excel treats data from version to version, giving one severe headaches. The import/export from/to CSV has worked all the time (in my experience).

Another reason is that you can debug a CSV file with a simple text editor. Even though XLSX is zipped XML and not binary, manually looking for problems can be a major PITA.

Third reason: CSV can be used to transfer the data to ANY system that is more suited for BI than Excel.

ybz12003
Rhodochrosite | Level 12

I need to upload the Excel file to our internal website, it wouldn't recognized the CSV format, only .xls and .xlsx. 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 17299 views
  • 2 likes
  • 3 in conversation