BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Cristina_inet
Fluorite | Level 6

hello everyone,
we are generating an ods pdf with tables. the tables have been generated with proc report and proc tabulate. we need this only for some tables, for others it is not necessary.
We need to rotate the column headers as follows:

 

Cristina_inet_0-1691751515143.png

 

now it is appearing like this:

 

Cristina_inet_1-1691751624012.png

How could it be done?

 

Thank you very much and greetings

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  I do not know whether it is possible to use ODS Excel or ODS Word techniques to get rotated headers in a PDF output file. You may not be able to do this directly with ODS PDF, but may have to create your document and then use a different tool, such as print to PDF functionality to make it work. For example, with SAS out of the picture, if I generate THIS file in Microsoft Word (with rotated headers):

Cynthia_sas_0-1691781921461.png

And then from inside Word, I do a Save AS PDF:

Cynthia_sas_1-1691781994357.png

 

Then when I open the PDF file, I see that the rotated headers were retained in the PDF format:

Cynthia_sas_2-1691782033864.png

  So I would think that it might be possible to create an Excel or Word document using ODS  and then from inside Excel or Word, do a SAVE AS PDF. In order to rotate the headers, you'd have to refer to the link that was posted or work with Tech Support.

  Over time, I have stopped using rotated headers because reading software will not always read the headers correctly when they are rotated.

Cynthia

 

 

View solution in original post

2 REPLIES 2
Ksharp
Super User

Here is for Excel file,NOT pdf.

While mayb @Cynthia_sas knew the solution.

 

https://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html

Cynthia_sas
SAS Super FREQ

Hi:

  I do not know whether it is possible to use ODS Excel or ODS Word techniques to get rotated headers in a PDF output file. You may not be able to do this directly with ODS PDF, but may have to create your document and then use a different tool, such as print to PDF functionality to make it work. For example, with SAS out of the picture, if I generate THIS file in Microsoft Word (with rotated headers):

Cynthia_sas_0-1691781921461.png

And then from inside Word, I do a Save AS PDF:

Cynthia_sas_1-1691781994357.png

 

Then when I open the PDF file, I see that the rotated headers were retained in the PDF format:

Cynthia_sas_2-1691782033864.png

  So I would think that it might be possible to create an Excel or Word document using ODS  and then from inside Excel or Word, do a SAVE AS PDF. In order to rotate the headers, you'd have to refer to the link that was posted or work with Tech Support.

  Over time, I have stopped using rotated headers because reading software will not always read the headers correctly when they are rotated.

Cynthia

 

 

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
  • 2 replies
  • 392 views
  • 0 likes
  • 3 in conversation