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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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