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
SAS Super FREQ
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

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