BookmarkSubscribeRSS Feed
ss171
Calcite | Level 5

Hi , 

I need to do two bwlow tasks :

1: I have three reports/table , want all them to be placed horizontally in excel (sheet_interval='none') work to place them vertially

can you suggest way in ods tagsets.excelxp

2: I have a report as a sample attached where there are multiple Desc and based on that creating different columns 

But I dont want the first heading in proc report output (Ex: Desc)

How can I do that . Below is the code I have used


proc report data=Sample
style(report)=[font=(calibri, 10pt) just=left]
style(column header)=[font=(calibri,12pt) font_weight = bold just=left]
style(column)=[font=(calibri, 10pt)] nowd;
column ('ID' ID) desc, Var;
define ID / group ' ';
define desc / across order=data;
define var / analysis sum style={tagattr='format:#,##0;[RED]-#,##0'} '';
run;

 

 

 

8 REPLIES 8
Sajid01
Meteorite | Level 14

1. Use ODS EXCEL . (ods tagsets.excelxp produces  files that are in reality xml files and are bloated -large in size. )
2.There are number of resources available .  For example a good starting point is   https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/  

ss171
Calcite | Level 5
Yes, but issue is in placing tables in horizontal way (not having any start point) . I have gone through many blogs but didnt get a solution
Sajid01
Meteorite | Level 14
Have no idea how your source data looks like.
Can you share the data used for this sample report?
ss171
Calcite | Level 5

@Sajid01 I have attached sample so there can be multiple proc results . I want them to be placed horizontally 

 

Sajid01
Meteorite | Level 14

Thanks.
I don't see any correlation between your original spreadsheet and the current one.

ss171
Calcite | Level 5
@Sajid01
There seems to be a confusion.
In the top query I asked for two tasks
One with proc report which is resolved by across ' ' .. syntax
Thanks
For other task I have attached sample excel if can help
Thanks
Cynthia_sas
SAS Super FREQ

Hi:

  It is easier to place output from different procedures on one page horizontally using ODS PDF and ODS LAYOUT, as shown below:

Cynthia_sas_0-1627057579907.png

 

This type of ODS LAYOUT is not supported for the ODS EXCEL destination, so this code would not work for Excel.

 

Since this capability to place procedure output horizontally is not available for ODS EXCEL You'd have to do a lot of data manipulation to create one data set with multiple columns to make this work in Excel. Here's an example:

Cynthia_sas_1-1627058108366.png

  In the above example, I just used 2 different datasets side by side. Assuming that your procedure of interest makes an output dataset, then you could do something similar but it is a lot of work to do something that ODS PDF does quite easily.

Cynthia

 

ss171
Calcite | Level 5
Ohhh Thanks @cynthia
Really nice explaination

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 8 replies
  • 892 views
  • 1 like
  • 3 in conversation