The SAS Output Delivery System and reporting techniques

ODS ExcelXPtagset creating sheet with empty dataset

Reply
Regular Contributor
Posts: 155

ODS ExcelXPtagset creating sheet with empty dataset

Hi 

 

I am creating multiexcel sheet with odsexcelxp tagset using proc report. i want Excel tab to be created even when the dataset is empty.Currently the sheet is creating tabs only for those the datsets are not empty

 

How to overcome this?

Super User
Posts: 19,039

Re: ODS ExcelXPtagset creating sheet with empty dataset

I don't believe there's a simple option, you'll have to force it somehow.

Do they need to be in a specific order?

How are you currently creating sheets and controlling what goes where?

 

If you're using BY groups you may want to add an empty level, ie has the variable that controls the sheets but all other var are missing. 

 

 

SAS Super FREQ
Posts: 8,816

Re: ODS ExcelXPtagset creating sheet with empty dataset

Hi:
@Reeza, is correct you have to control for this yourself. I believe there have been several earlier postings asking this same question. Most people will use the SAS Macro facility to test for whether the desired table is in existence and if it does not exist, they write a dummy table out, frequently with just an error message. Here's an example of a previous posting: https://communities.sas.com/t5/Base-SAS-Programming/How-to-test-for-zero-observations-and-still-be-i... and https://communities.sas.com/t5/Base-SAS-Programming/Create-Empty-Data-File/td-p/62088 and here's an older example in a Tech Support note that discusses the Output Window -- http://support.sas.com/kb/26/157.html or http://support.sas.com/kb/24/670.html -- you'd have to modify the code a bit to send output to ODS destinations.
cynthia
Regular Contributor
Posts: 155

Re: ODS ExcelXPtagset creating sheet with empty dataset

@cynthia I created a blank row in the table and spit it out and it worked
I appreciate your patience and support
Regular Contributor
Posts: 155

Re: ODS ExcelXPtagset creating sheet with empty dataset

@Reeza I created a table with an empty row and it worked.I always appreciate your support
Ask a Question
Discussion stats
  • 4 replies
  • 143 views
  • 2 likes
  • 3 in conversation