I am using SAS 9.4 64 bit to read 32 bit Excel files. This code below works fine:
PROC IMPORT OUT= WORK.mydata
DATAFILE= "&PTH\myfile.xlsx"
DBMS=XLSX REPLACE;
sheet="MyData";
RUN;
Is there a way to get the Import Wizard to generate similar code? I haven't had any luck with that so far.
Bill Price
You get an option to save the commands during the process. It's shown in the following youtube video: Import Wizard SAS Demonstration - YouTube
Thanks Arthur. I should have been more explicit. This is what I'd like to do, but the wizard stops before I get that chance due to the infamous 64 bit SAS <- 32 bit Office incompatibility problem. From my understanding, the XLSX menu item in the 64 bit SAS Import Wizard will only work with 64 bit Excel files and I'd like to find a way to use the Wizard to read 32 bit files w/o resorting to the PC Files Server option. It seems odd that the Wizard could not do what I need as I can manually code a working solution as above. Admittedly though, although I've worked with SAS for nearly 30 years, I am not well versed in these new fangled aspects of SAS . #OldDogHere
I'm old school as well (40+ years) and have been disappointed over the years with the system "intelligence" with respect to importing and exporting Excel files.
One alternative, if it is just to remind oneself of the needed code, is to save the code as a SAS abbreviation. See, e.g., http://support.sas.com/resources/papers/proceedings09/073-2009.pdf
Ahh, that's a neat trick. I'll have to try this. Like texting auto-complete that actually works . Thanks for that tip.
The question and need are really for my clients who will inevitably being trying to use the Wizard and having problems. It always looks better on my end if I have an answer that works for them :smileysilly:.
Thanks again for the tip on abbreviations. Always something new to learn...
And, if that does serve the purpose, any abbreviations you create can be shared with your users. There is a collection of them, and links to how they can be shared, at: Abbreviations/Macros - sasCommunity
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 16. Read more here about why you should contribute and what is in it for you!