Desktop productivity for business analysts and programmers

Appending table with data onto a blank excel worksheet.

Reply
New Contributor
Posts: 3

Appending table with data onto a blank excel worksheet.

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?

Super User
Posts: 23,264

Re: Appending table with data onto a blank excel worksheet.

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. 

New Contributor
Posts: 3

Re: Appending table with data onto a blank excel worksheet.

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. 

Super User
Posts: 23,264

Re: Appending table with data onto a blank excel worksheet.

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. 


 

Valued Guide
Posts: 559

Re: Appending table with data onto a blank excel worksheet.

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

Thanks,
Suryakiran
New Contributor
Posts: 3

Re: Appending table with data onto a blank excel worksheet.

Posted in reply to SuryaKiran

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.

Ask a Question
Discussion stats
  • 5 replies
  • 113 views
  • 0 likes
  • 3 in conversation