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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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