BookmarkSubscribeRSS Feed
Cmont005
Calcite | Level 5

Hello, brand new SAS user here so bear with me. I'm currently trying to append a table that has data, to a blank excel worksheet. The issue I am having is I am unable to import a blank excel worksheet into the program. Also, my instructor said all operations are to be done through SAS. My method to get around this problem was to create field headings and adjust the format to match that of the first table in excel. Unfortunately, I don't think this will be accepted. Is there another way to solve this problem?

5 REPLIES 5
Reeza
Super User

It's not exactly clear what you're trying to accomplish here and why you need to 'import a blank excel workbook' or how you're appending. I think it would help if you explained what you're trying to do rather than what you think the solution may be. 

Cmont005
Calcite | Level 5

I have an assignment: 

For Project 4:

  1. In Excel, create another table, name it "StudentNew"
  2. Append these two tables: " Student" and " StudentNew" using SAS software
  3. Accumulate results in the same word document as project 3
  4.  Submit results

The "Student" table has several fields and has 20 records. As the project describes, I need to create a blank worksheet called "StudentNew" and append the two. 

Reeza
Super User

SAS 9 series is not informative, you need to provide the version, ie SAS 9.4 TS1M5.  SAS 9.X has been around for more than a decade. 

 

You missed part of the instructions there, I suspect because it’s not explicit. It says create another table - which I would interpret as creating a table with information and then reading both into SAS. If you’re feeling lazy, right click the Student tab, click Move or Copy, and then click make a new copy and rename the sheet to StudentNew. 

 

To append data, use PROC APPEND. 

 


@Cmont005 wrote:

I have an assignment: 

For Project 4:

  1. In Excel, create another table, name it "StudentNew"
  2. Append these two tables: " Student" and " StudentNew" using SAS software
  3. Accumulate results in the same word document as project 3
  4.  Submit results

The "Student" table has several fields and has 20 records. As the project describes, I need to create a blank worksheet called "StudentNew" and append the two. 


 

SuryaKiran
Meteorite | Level 14

Try using EXCEL LIBNAME engine method to append data to an empty table. 

Thanks,
Suryakiran
Cmont005
Calcite | Level 5

Does this method only apply to using the SAS 9 series programs? Because I should have mentioned I am using the Enterprise Guide 5.1.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 853 views
  • 0 likes
  • 3 in conversation