BookmarkSubscribeRSS Feed
pdiff
Obsidian | Level 7

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

5 REPLIES 5
art297
Opal | Level 21

You get an option to save the commands during the process. It's shown in the following youtube video: Import Wizard SAS Demonstration - YouTube

pdiff
Obsidian | Level 7

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 Smiley Happy.  #OldDogHere

art297
Opal | Level 21

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

pdiff
Obsidian | Level 7

Ahh, that's a neat trick.  I'll have to try this.  Like texting auto-complete that actually works Smiley Happy .  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...

art297
Opal | Level 21

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

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
  • 5 replies
  • 3471 views
  • 3 likes
  • 2 in conversation