Hello all,
I am new to SAS. I am trying to export some data from WRDS to excel.
I am using the following code:
PROC SQL;
CREATE TABLE WORK.query AS
SELECT 'Name'n FROM CISDM.ACTIVE_FUND_INFO;
RUN;
QUIT;
PROC DATASETS NOLIST NODETAILS;
CONTENTS DATA=WORK.query OUT=WORK.details;
RUN;
PROC PRINT DATA=WORK.details;
RUN;
PROC EXPORT DATA=WORK.query;
outfile='/home/qmul/beir/sasuser.v94/Book1'
dbms=xlsx
run;
I have uploaded an empty Excel file to SAS. The error I get is:
ERROR: FILE=OR TABLE= is required and must be satisfied.
Could you please help me with this?
Thank you very much.
PROC SQL;
CREATE TABLE WORK.query AS
SELECT 'Name'n FROM CISDM.ACTIVE_FUND_INFO;
RUN;
QUIT;
PROC DATASETS NOLIST NODETAILS;
CONTENTS DATA=WORK.query OUT=WORK.details;
RUN;
PROC PRINT DATA=WORK.details;
RUN;
PROC EXPORT DATA=WORK.query
outfile='/home/qmul/beir/sasuser.v94/Book1.xlsx'
dbms=xlsx replace;
run;
@beir wrote:
Hello all,
I am new to SAS. I am trying to export some data from WRDS to excel.
I am using the following code:
PROC SQL;
CREATE TABLE WORK.query AS
SELECT 'Name'n FROM CISDM.ACTIVE_FUND_INFO;
RUN;
QUIT;
PROC DATASETS NOLIST NODETAILS;
CONTENTS DATA=WORK.query OUT=WORK.details;
RUN;
PROC PRINT DATA=WORK.details;
RUN;
PROC EXPORT DATA=WORK.query;
outfile='/home/qmul/beir/sasuser.v94/Book1'
dbms=xlsx
run;I have uploaded an empty Excel file to SAS. The error I get is:
ERROR: FILE=OR TABLE= is required and must be satisfied.
Could you please help me with this?
Thank you very much.
A semicolon is missing after "dbms=xlsx".
Hello,
What is WRDS? Wharton Research Data Services?
To start with, I think your
outfile='/home/qmul/beir/sasuser.v94/Book1'
should be
outfile='/home/qmul/beir/sasuser.v94/Book1.xlsx'
Koen
PROC SQL;
CREATE TABLE WORK.query AS
SELECT 'Name'n FROM CISDM.ACTIVE_FUND_INFO;
RUN;
QUIT;
PROC DATASETS NOLIST NODETAILS;
CONTENTS DATA=WORK.query OUT=WORK.details;
RUN;
PROC PRINT DATA=WORK.details;
RUN;
PROC EXPORT DATA=WORK.query
outfile='/home/qmul/beir/sasuser.v94/Book1.xlsx'
dbms=xlsx replace;
run;
@beir wrote:
Hello all,
I am new to SAS. I am trying to export some data from WRDS to excel.
I am using the following code:
PROC SQL;
CREATE TABLE WORK.query AS
SELECT 'Name'n FROM CISDM.ACTIVE_FUND_INFO;
RUN;
QUIT;
PROC DATASETS NOLIST NODETAILS;
CONTENTS DATA=WORK.query OUT=WORK.details;
RUN;
PROC PRINT DATA=WORK.details;
RUN;
PROC EXPORT DATA=WORK.query;
outfile='/home/qmul/beir/sasuser.v94/Book1'
dbms=xlsx
run;I have uploaded an empty Excel file to SAS. The error I get is:
ERROR: FILE=OR TABLE= is required and must be satisfied.
Could you please help me with this?
Thank you very much.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.