BookmarkSubscribeRSS Feed
Cynthia_sas
SAS Super FREQ
Hi:
The Tech Support note that Scott referenced in an earlier post in this thread talks about how you can import .XLSX files using SAS 9.2, Phase 2.

If you think about it, an Excel "macro-enabled" spreadsheet of type .XLSM, has something above and beyond the data added to it (Excel macro instructions). I don't know whether there are any plans to be able to read .XLSM files with the LIBNAME engine or PROC IMPORT. This would be a question for Tech Support.

If you save the .XLSM file as a .XLSX or .XLS (Excel 97-2003 file), can you then read the spreadsheet with SAS??? I would expect so.

cynthia
polingjw
Quartz | Level 8
Yes, I can read the file when saved as a .XLS document. The author of the file, however, wants to keep the file in the macro-enabled Excel 2007 format. As an alternative, I was able to read the data using DDE.

Thanks.
GeoffNess
Fluorite | Level 6
When I've encountered similar situations in the past, I've used a separate VBA process to save a new copy of the file in .xls format, before running the SAS import process. The macro-enabled copy is preserved but not read in. The issue of course is the duplication of the files.
advoss
Quartz | Level 8
Just a thought.

Could you programmatically loop through the spreadsheets using SAS and DDE (or an Excel macro) to open the spreadsheets and "re-save" them as XLS 97-2003 spreadsheets?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Discussion stats
  • 18 replies
  • 3565 views
  • 1 like
  • 8 in conversation