re: Importing Data from Excel

Accepted Solution Solved
Reply
Regular Contributor
Posts: 228
Accepted Solution

re: Importing Data from Excel

Hi.....I just recently upgraded SAS from 9.2 to 9.4. I have a program that involves importing data from a excel file and worked fine when using SAS 9.2. When I try and run the same program using SAS 9.4, I get an error message and the data insn't importing into SAS. However, if I open the Excel file that I am importing data from and leave it open and run the program using SAS 9.4, it works fine and the data is imported as a dataset. Is there something I need to add to correct this......Thanks.


Accepted Solutions
Solution
‎12-12-2016 09:22 AM
Respected Advisor
Posts: 4,132

Re: re: Importing Data from Excel

[ Edited ]

I'm quite astonished that things work for you when the Excel file is opened. It's normally the other way round and SAS can't find the file.

 

I don't have an explanation for what you observe, but:

 

To import an Excel file with SAS 9.2 the PC Files Server had to be up-and-running. With SAS9.4 you've got now a new XLSX engine which allows you to import Excel files without the PC Files Server (you still need the SAS/Access to PC Files license though).

I'd change the code and use the XLSX engine. It makes things just much more straightforward. 

View solution in original post


All Replies
Solution
‎12-12-2016 09:22 AM
Respected Advisor
Posts: 4,132

Re: re: Importing Data from Excel

[ Edited ]

I'm quite astonished that things work for you when the Excel file is opened. It's normally the other way round and SAS can't find the file.

 

I don't have an explanation for what you observe, but:

 

To import an Excel file with SAS 9.2 the PC Files Server had to be up-and-running. With SAS9.4 you've got now a new XLSX engine which allows you to import Excel files without the PC Files Server (you still need the SAS/Access to PC Files license though).

I'd change the code and use the XLSX engine. It makes things just much more straightforward. 

Regular Contributor
Posts: 228

Re: re: Importing Data from Excel

Hi Patrick...Thank you for input and solution. I did make the change to the excel file extension to .xlsx and it works. Just to let you know, this is the error message that I was getting when the excel file had the extension .xls  Thanks once a gain.

 

An error was returned which indicates that the Excel source file may be password protected. In order for the Import Data wizard to be able to access the data within the file, open the workbook within Excel first.

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 188 views
  • 1 like
  • 2 in conversation