As David says, you must have data or Excel isn't happy.
One workaround is to create an almost empty data set (1 row, all missing values) and print that if the original data set has no observations.
That's easy to do if your input data set is a real data set (not a view) and doesn't have deleted observations. See my ancient SUGI paper "How Many Observations Are In My Data Set?", <>.
You could try this, where &DATA is replaced by your data set name.
=====
data printme / view=printme;
if _n_ = 1 and no_more_data then
output;
set &DATA. end=no_more_data;
output;
run;
proc print data=printme noobs;
run;
=====
If &DATA has observations, they will be returned. If it has no observations, one observation with all missing values will be returned.>