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
AnandVyas
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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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