I'm using the excelXP tagset to create an Excel workbook with 2 tabs. Sometimes one of the datasets is empty and the tab is not produced at all. In the case of an empty dataset, I'd still like to produce the tab with just a header row so the user knows the report was run but found no records. Suggestions?
modify that empty dataset to have just one "missing" row, with something like this
- assuming the data set is named in &dataset and it is the kind of data set that will have a value for NOBS[pre]
data _null_ ;
if not nobs then
call execute( 'data &dataset; output ; set &dataset ; run ; ' ) ;
stop;
set &dataset nobs=nobs ;
run ;[/pre]seems to work for me