BookmarkSubscribeRSS Feed
JasonNC
Quartz | Level 8

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?

4 REPLIES 4
Reeza
Super User

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. 

 

 

Cynthia_sas
Diamond | Level 26
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
JasonNC
Quartz | Level 8
@cynthia I created a blank row in the table and spit it out and it worked
I appreciate your patience and support
JasonNC
Quartz | Level 8
@Reeza I created a table with an empty row and it worked.I always appreciate your support

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 2106 views
  • 2 likes
  • 3 in conversation