BookmarkSubscribeRSS Feed
rajashekhar1708
Calcite | Level 5

Able to connect to PC files but not able view the data and write to the excel file.

 

CODE:

 

options validvarname=any;

libname xl XLSX 'C:\Users\107792\Desktop\excel\con_a_del.xlsx';

 

/* discover member (DATA) names */

proc datasets lib=xl;

quit;

 

libname xl list;

 

 

PROC DATASETS LIBRARY=xl;

QUIT;

 

 

 

data xl.class;

                set sashelp.class;

run;

 

proc sql;

                create table as xl.class;

                select * from Sashelp.class;

quit;

 

libname xl clear;

 

 

LOG

 

1    %studio_hide_wrapper;

82   options validvarname=any;

83   libname xl XLSX 'C:\Users\107792\Desktop\excel\con_a_del.xlsx';

NOTE: Libref XL was successfully assigned as follows:

      Engine:        XLSX

      Physical Name: C:\Users\107792\Desktop\excel\con_a_del.xlsx

 

/* con__del.xlsx file is having 10 sheets naming S1,S2,S3….S10 those sheets are also not recognised */

84  

85   /* discover member (DATA) names */

86   proc datasets lib=xl;

                                                             Directory

                                    Libref         XL                                         

                                    Engine         XLSX                                        

                                    Physical Name  C:\Users\107792\Desktop\excel\con_a_del.xlsx

                                    Por            .                                          

WARNING: No matching members in directory.

87   quit;

NOTE: PROCEDURE DATASETS used (Total process time):

      real time           0.02 seconds

      cpu time            0.03 seconds

     

88  

89   libname xl list;

NOTE: Libref=   XL

      Scope=    Compute Server

      Engine=   XLSX

      Physical Name= C:\Users\107792\Desktop\excel\con_a_del.xlsx

      Por=

90  

91  

92   PROC DATASETS LIBRARY=xl;

                                                             Directory

                                    Libref         XL                                          

                                    Engine         XLSX                                       

                                    Physical Name  C:\Users\107792\Desktop\excel\con_a_del.xlsx

                                    Por            .                                          

WARNING: No matching members in directory.

93   QUIT;

NOTE: PROCEDURE DATASETS used (Total process time):

      real time           0.01 seconds

      cpu time            0.01 seconds

     

94  

95  

96  

97   data xl.class;

98   set sashelp.class;

99   run;

ERROR: Temporary file for XLSX file can not be created -> C:\Users\107792\Desktop\excel\/con_a_del.$$1.  Make sure the path name is

correct and that you have write permission.

ERROR: File XL.class.DATA does not exist.

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

WARNING: The data set XL.class was only partially opened and will not be saved.

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.01 seconds

     

100 

101  proc sql;

102  create table as xl.class;

                      --      -

                      79      22

                              76

ERROR 79-322: Expecting a LIKE.

ERROR 22-322: Syntax error, expecting one of the following: (, AS, LIKE. 

ERROR 76-322: Syntax error, statement will be ignored.

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.

103  select * from Sashelp.class;

NOTE: Statement not executed due to NOEXEC option.

104  quit;

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

NOTE: PROCEDURE SQL used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

     

105 

106  %studio_hide_wrapper;

117 

118 

3 REPLIES 3
Anand_V
Ammonite | Level 13
Does the user under which the SAS session is executing has permission to write to the path - C:\Users\107792\Desktop\excel\? The error states that it could not create a tmp file at this location.
BrianGaines
SAS Employee

Hi @rajashekhar1708,

 

Which version of SAS Studio are you using?  SAS Studio 5.1?

 

Thanks,

 

-Brian

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 500 views
  • 0 likes
  • 3 in conversation