This structure is quite simple to replicate with a proc report inside an ods excel structure. imcluding multisheet reports. You can also create any printer ourtput such as html, pdf, etc.
You could strart with this link, and also read up on the papers available on this topic on the SAS Global Forum
Do have a specific requirement?
Good morning everyone,
many thanks for all advice.
My boss said me that the problem is to replicate cell unified (yellow area) in SAS.
Is there anyway to do that?
Secondo question, Is it possibile to use a structure of table and just put inside a dataset?
Thank you very much
@Anto180788 wrote:
Good morning everyone,
many thanks for all advice.
My boss said me that the problem is to replicate cell unified (yellow area) in SAS.
Is there anyway to do that?
PROC REPORT can set background colors for each column, and you can also (in a COMPUTE block) set attributes (including the background) for a single report item depending on position or content.
Secondo question, Is it possibile to use a structure of table and just put inside a dataset?
Please explain what you mean by that.
SAS provides metadata in the SQL DICTIONARY tables, so you can retrieve that from there.
If, OTOH, you want to create the structure in a dataset without having actual data, you can do it like this:
data class;
set sashelp.class;
stop;
run;
The resulting dataset will have all columns from SASHELP.CLASS, but zero observations.
@Anto180788 wrote:
Hi Kurt,
thank you for your answer.
1) In proc report, can you create exactly a column with a space as in example?
2) I mean, I want use that table strucutre (initially empty) and put data inside. As an insert in sql.
No. You are still confusing the REPORT that you want to create in the Excel file and the DATA that you will need to create it.
Hello @Anto180788
It is indeed possible to create a table structure / empty table for the columns highlighted in yellow.
As a proof of concept I am giving the code that would create an emtpy table or structure .The variable names, types and size are indicative examples and need to be subsituted with actual values.
Data can be stored in the table so created. Reports can be produced using the data stored in the table.
/*This portion creates the table*/
Proc sql;
create table work.Empty_table (label="Impact and Substitutability Analysis")
(
Market_share num length=8 format=best12. label="Market Share",
Impact_on_market char length=100 label="Impact On Market",
Substitutability char length=100 label="Substitutability",
Critical_function char length=100 label="Critical Function"
);
quit;
/* This portion gives the details of the table*/
proc contents data=work.empty_ds3;
run;
The operative portion of the output of the content portion are reproduced below :
This shows the structure of the table:
This extract shows the table label:
@Anto180788 wrote:
Hi Kurt,
thank you for your answer.
1) In proc report, can you create exactly a column with a space as in example?
2) I mean, I want use that table strucutre (initially empty) and put data inside. As an insert in sql.
This is a REPORT. You don't "insert" data into it, you create it from raw data with PROC REPORT.
PROC REPORT allows spanning, structured headers.
To show you code, we need to see your raw, tabular data.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.