BookmarkSubscribeRSS Feed
SASHunter
Obsidian | Level 7
I am using SAS to produce an Excel workbook. We have recently converted to MS 2007. The program works fine, I have only changed the extensions on the files to '.xlsx'. But when I try to open the file after closing Excel and SAS, in Excel 2007 it says the file if corrupted or the extension is wrong. How do I save the file as the new 2007 format. This is a piece of the current code that I have:

%let excelout = &newdrive&dirpath.\data\schips\&monyr\&mth&yr._mthlychk.xlsx;
data _null_;
file cmdexcel;
put "[save.as(%bquote("&excelout"))]";
run;

The SAVE.AS does not seem to be enough. How can I put the File Format into the put statement? Also are there any good examples on the web that show me different Excel commands and formats that can be used inside put statements from SAS?

Thanks, Nancy
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You topic/query has been discussed on the SAS forums before - suggest you search the archives. Also, there is "Excel version support" information on the SAS.COM support website at http://support.sas.com/ either using SEARCH or possible a Google advanced search argument, such as:

excel version 2007 support site:sas.com

Also, you will need to consider that SAS version support and related Excel version support may not generate an actual Excel 2007 format file for you, however you do have some options.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 636 views
  • 0 likes
  • 2 in conversation