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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 519 views
  • 0 likes
  • 2 in conversation