Example data should be in the form of data step code.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the <> icon or attached as text to show exactly what you have and that we can test code against.
By table do you mean a data set or a report that people read?
So you basically want to append the observation counts of three datasets with the dataset labels?
The strings that you posted are not valid as dataset names.
How do you relate the texts to dataset names?
So you want to make a REPORT that has three observations and one variable?
You could use PROC SQL.
Let's assume your three datasets are named A, B and C.
proc sql;
select 1 as order,catx(' - ',count(*),'total purchases done.') as message from A
union
select 2 as order,catx(' - ',count(*),'total new products.') as message from B
union
select 3 as order,catx(' - ',count(*),'total old products using barcode.') as message from C
order by order
;
Stuffing dynamic data into an existing EXCEL file is not really a workable idea.
You could update a data sheet in the EXCEL file and then have the pretty reporting sheet populate the values from that data sheet.
Or produce the full report using your SAS program.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.