BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm using Proc Export to copy two datasets to an Excel (xlsx) spreadsheet (code below). Everything works ok except that I get three extra blank sheets (named sheet1, sheet2 and sheet3) before my two output sheets (Micro and Chem). Can anyone tell me what's going on? Thanks!

Jeff


PROC EXPORT
DATA=qc.micro_sorted
OUTFILE= "&req_dir\R110185 Listing.xlsx"
DBMS=EXCEL
REPLACE;
SHEET="Micro";
RUN;

PROC EXPORT
DATA=qc.chem_sorted
OUTFILE= "&req_dir\R110185 Listing.xlsx"
DBMS=EXCEL
REPLACE;
SHEET="Chem";
RUN;


Additionally, I figured out that I only get the extra sheets when the spreadsheet already exists but don't get them if this is run without the spreadsheet already existing. Message was edited by: JCS
1 REPLY 1
stateworker
Fluorite | Level 6
We don't have the ability to export directly to Excel, so I don't know about this, but I do know that Excel will often open a new workbook with multiple sheets - default tends to be three unless you change that.

When you say you only get the sheets when spreadsheet already exists, does that mean when you originally create the spreadsheet via SAS, you don't get it, but then you Replace into it, it adds three blank sheets? Or do you mean you've created an workbook via Excel and then export into it?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3416 views
  • 0 likes
  • 2 in conversation