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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 755 views
  • 0 likes
  • 2 in conversation