BookmarkSubscribeRSS Feed
SYLC
Calcite | Level 5

Hello

 

I have this code which output a tabulate table to excel for me. It works fine when it run in SAS EG but when run through SAS management console I get insufficient access error. I believe I need to add noprint function as I had the same error when I used proc sql with count functions but proc tabulate doesn't seem to to have one. I have tried ods select none but this stop the tabulate table to export to excel.

 

ods excel file="//file location/name.xslx"
options(sheet_name="data");
 
PROC TABULATE
DATA=WORK.test
FORMAT=COMMA10.
OUT=WORK.STABSummaryTables2(LABEL="Test Table");
 
VAR var1 var2;
CLASS var3 / ORDER=UNFORMATTED MISSING;
CLASS var4 / ORDER=UNFORMATTED MISSING;
TABLE 
/* ROW Statement */
var4
all = 'Total'  ,
/* COLUMN Statement */
var3  *(Var1 * Sum=' ' var2 * Sum=' ' )
/ BOX="Tablename";
RUN;
 
In case it was something with the export file. I have delete the output before i run the code in SMC but still this doesn't work. Any help would be appriecated! Thanks in advance.

 

 

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  My guess is that the problem is write access to the location where you are trying to write the XLSX output file. OR, if your code is inside a stored process that you haven't modified the code to run on the Stored Process Server or the Workspace server (if it is a stored process) or you haven't modified the code to run in a SAS Studio job if you are using Viya and the CAS server. This is probably something that you need to consult with Tech Support about. The way you modify your code and define your folder for writing output will be different depending on whether you're using stored processes and the metadata server on the BI Platform or whether you're using code in SAS Studio on a Viya/CAS platform.

Cynthia

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 389 views
  • 0 likes
  • 2 in conversation