BookmarkSubscribeRSS Feed
jhh197
Pyrite | Level 9

I have two excel files test1 and test2 test1.xlsx has three tabs as shown below

test1.xlsx has 3 tabs

APPLE

ABC
12345
22.34.5

 

orange

ABCD
123456
22.34.57

 

grape

ABC
12345
22.34.5

 

TEST2.XLSX has two tabs

apple

ABC
555566
22.3

4.5

 

orange

ABCD
4636596
22.34.57

 

and after appending Test1 and Test2.xlsx my final excel file test3.xlsx should look like below with 3 tabs

APPLE

ABC
12345
22.34.5
555566
22.3

4.5

 

ORANGE

ABCD
123456
22.34.57
4636596
22.34.57

 

grape

ABC
12345
22.34.5

 

Can anyone please help how do I append two excel files ?

 

 

4 REPLIES 4
Reeza
Super User

I'm assuming you want to do this in SAS?

 

First import your data to have SAS data sets 
You can write a PROC IMPORT step or use the Import Utility, which will generate the code:

http://video.sas.com/detail/video/4664358166001/using-the-import-data-utility-in-sas-studio?autoStar...

 

Then I would suggest looking into PROC APPEND. 

 


@jhh197 wrote:

I have two excel files test1 and test2 test1.xlsx has three tabs as shown below

test1.xlsx has 3 tabs

APPLE

A B C
123 4 5
2 2.3 4.5

 

orange

A B C D
123 4 5 6
2 2.3 4.5 7

 

grape

A B C
123 4 5
2 2.3 4.5

 

TEST2.XLSX has two tabs

apple

A B C
55 55 66
2 2.3

4.5

 

orange

A B C D
46 36 59 6
2 2.3 4.5 7

 

and after appending Test1 and Test2.xlsx my final excel file test3.xlsx should look like below with 3 tabs

APPLE

A B C
123 4 5
2 2.3 4.5
55 55 66
2 2.3

4.5

 

ORANGE

A B C D
123 4 5 6
2 2.3 4.5 7
46 36 59 6
2 2.3 4.5 7

 

grape

A B C
123 4 5
2 2.3 4.5

 

Can anyone please help how do I append two excel files ?

 

 


 

 

Vince_SAS
Rhodochrosite | Level 12

What version of SAS are you using, what operating system is SAS running on, and do you licence the SAS/ACCESS Interface to PC Files?

 

Vince DelGobbo

SAS R&D

jhh197
Pyrite | Level 9

I am running SAS EG 71 64 bit

 

 

 

 

Thank you

Vince_SAS
Rhodochrosite | Level 12

Do you want to use the point-and-click interfaces, or do you want to write your own SAS code?

 

Please submit this code from your SAS Enterprise Guide session, and then post the log:

 

%put &=SYSVLONG  &=SYSSCPL;

proc product_status; run; quit;

 

Vince DelGobbo

SAS R&D

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1941 views
  • 0 likes
  • 3 in conversation