Learning SAS? Welcome to the exclusive online community for all SAS learners.

Please tell me what is wrong?? :( :(

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

Please tell me what is wrong?? :( :(

CODE:

/** Import an XLS file.  **/

PROC IMPORT DATAFILE="C:/SASUniversityEdition/myfolders/sasuser.v94/myfolder/newdata1.xlsx"

     OUT=SASHELP.MYEXCEL

     DBMS= EXCEL

     REPLACE;

RUN;

/** Print the results. **/

PROC PRINT DATA=SASHELP.MYEXCEL; RUN;

LOG:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 /** Import an XLS file. **/

44 

45 PROC IMPORT DATAFILE="C:/SASUniversityEdition/myfolders/sasuser.v94/myfolder/newdata1.xlsx"

46 OUT=SASHELP.MYEXCEL

47 DBMS= EXCEL

48 REPLACE;

ERROR: DBMS type EXCEL not valid for import.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IMPORT used (Total process time):

  real time 0.00 seconds

  cpu time 0.01 seconds

  

49 RUN;

50 

51 /** Print the results. **/

52 

53 PROC PRINT DATA=SASHELP.MYEXCEL; RUN;

ERROR: File SASHELP.MYEXCEL.DATA does not exist.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE PRINT used (Total process time):

  real time 0.00 seconds

  cpu time 0.00 seconds

  

54 ;

55 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

65 ;


Accepted Solutions
Solution
‎06-11-2014 04:16 AM
Trusted Advisor
Posts: 3,212

Re: Please tell me what is wrong?? :( :(

In your sas code use the /folders. ..../myfolder/... naming, not the Windows alike.

Use the xlsx interface  not the excel one.

---->-- ja karman --<-----

View solution in original post


All Replies
Trusted Advisor
Posts: 3,212

Re: Please tell me what is wrong?? :( :(

Amesh, you are repeating your question without listening to answers and doing the googling for additional documentation.

The analyticsu is running an Unix version of sas in a virtual machine. All questions to using sas should follow the Unix companion. That companion is describing the Unix specifics of sas. Google to find that.

Every usage on c: and other windows specifics is useless.

The attempt to excel interface will fail you can use the xlsx interface. Xlsx is zip file with XML files.

---->-- ja karman --<-----
Occasional Contributor
Posts: 16

Re: Please tell me what is wrong?? :( :(

i know that its running on unix on a vm.

my point is how can i upload my file into the library i have created?

Super User
Posts: 5,424

Re: Please tell me what is wrong?? :( :(

Sounds like SAS/ACCESS to PC Formats is not included in your license/install. Try to export your Excel to csv instead.

Data never sleeps
Trusted Advisor
Posts: 3,212

Re: Please tell me what is wrong?? :( :(

Linus, it is the analyticsu edition. I have seen (I believe) the access profiles being in the setinit info.

But it is running Linux everything that needs windows like the ace driver will not work

---->-- ja karman --<-----
Occasional Contributor
Posts: 16

Re: Please tell me what is wrong?? :( :(

Linus, i checked it..its included

Trusted Advisor
Posts: 3,212

Re: Please tell me what is wrong?? :( :(

The first thing is you cannot use the Windows naming you must use the Unix naming conventions.

You can see those when asking the properties of existing files libraries in the left down area.

The virtual machine is making the connection between windows and Unix. When done correctly you can store.see that at the Windows desktop and use that in the Unix side also but with the Unix naming!

---->-- ja karman --<-----
Trusted Advisor
Posts: 3,212

Re: Please tell me what is wrong?? :( :(

The first thing is you cannot use the Windows naming you must use the Unix naming conventions.

You can see those when asking the properties of existing files libraries in the left down area.

The virtual machine is making the connection between windows and Unix. When done correctly you can store.see that at the Windows desktop and use that in the Unix side also but with the Unix naming!

---->-- ja karman --<-----
Occasional Contributor
Posts: 16

Re: Please tell me what is wrong?? :( :(

nn.jpg

Occasional Contributor
Posts: 16

Re: Please tell me what is wrong?? :( :(

this is the screenshot...it shows location as /folders/myfolders/sasuser.v94/myfolder

now i have made a shared folder through which i am accessing this folder...and it is in c drive but when i enter this location to import file its not

getting importeed...so how can i do this...reply in context to my query.

Solution
‎06-11-2014 04:16 AM
Trusted Advisor
Posts: 3,212

Re: Please tell me what is wrong?? :( :(

In your sas code use the /folders. ..../myfolder/... naming, not the Windows alike.

Use the xlsx interface  not the excel one.

---->-- ja karman --<-----
Occasional Contributor
Posts: 16

Re: Please tell me what is wrong?? :( :(

Thank you sir...its working now!!

🔒 This topic is solved and locked.

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

Discussion stats
  • 11 replies
  • 1561 views
  • 8 likes
  • 3 in conversation