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-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!

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