BookmarkSubscribeRSS Feed
singhsahab
Lapis Lazuli | Level 10

Coud anybody explain how to import data in multiple excel sheet in a single excel file by using ODS and PROD REPORT. 

6 REPLIES 6
ChrisBrooks
Ammonite | Level 13

You can't import data with ODS and Proc Report - if you want to read an excel file with multiple worksheets you should use either the EXCEL, PCFILES or XLSX engines as shown in this link http://support.sas.com/documentation/cdl/en/acpcref/69731/HTML/default/viewer.htm#p05hxa7xihwolmn1sd... - the workbook will then appear as a library with each worksheet appearing as a seperate data set

Patrick
Opal | Level 21

@singhsahab

What exactly are you trying to achieve? What do you have (what's your starting point) and what do you want (what's the desired result)?

singhsahab
Lapis Lazuli | Level 10
Dear Patrick,

I've two dataset tab1 and tab2. I want to export these dataset into a single excel sheet with sheet name tab1 and tab2.

I'm able to achieve this by using ODS EXCEL and PROC PRINT but i want to achieve this by using ODS EXCEL and PROC REPORT .
Reeza
Super User

Making a very broad assumption that you actually mean export to Excel, see the examples here:

https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html

 

Otherwise, please clarify your question. 

 


@singhsahab wrote:

Coud anybody explain how to import data in multiple excel sheet in a single excel file by using ODS and PROD REPORT. 


 

singhsahab
Lapis Lazuli | Level 10

Dear Reeza,

I've two dataset tab1 and tab2. I want to export these dataset into a single excel sheet with sheet name tab1 and tab2.

I'm able to achieve this by using ODS EXCEL and PROC PRINT but i want to achieve this by using ODS EXCEL and PROC REPORT .

Reeza
Super User

@singhsahab wrote:

Dear Reeza,

I've two dataset tab1 and tab2. I want to export these dataset into a single excel sheet with sheet name tab1 and tab2.

I'm able to achieve this by using ODS EXCEL and PROC PRINT but i want to achieve this by using ODS EXCEL and PROC REPORT .


So replace your PROC PRINT with the PROC REPORT. 

I'm not sure what the question is beyond that or how we can help you out here. 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 992 views
  • 1 like
  • 4 in conversation