BookmarkSubscribeRSS Feed
Aman4SAS
Obsidian | Level 7

Hi,

I have to create two report in a single sheet [one after one];

I am facing problem with column width. as i required different column width for  both report.

i.e. Column A width for first report in 2in and for second report 4in.

Is it possible in SAS?

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

ods tagsets.excelxp file=....;

ods tagsets.excelxp options(sheet_name="Sheetname");

proc report data=first...

     define column / style(column)=[width=2in];

...

proc report data=second...

     define column / style(column)=[width=4in];

...

ods tagsets.excelxp options(sheet_name="Next sheet");

...

Note: Actually saying that, it might not work.  Reason is SAS reports by column per dataset.  Try, though I don't think you will be able to get mixed column widths.  However you could export your data and write a VBA script to place data where you like in a template file, that's relatively easy though you need to know VBA.

ballardw
Super User

If you can do this in Excel (not SAS to Excel) without merging cells I'd be very surprised. Excel basically doesn't support that behavior, at least that I've seen.

PDF and RTF but not Excel.

Aman4SAS
Obsidian | Level 7

Yes , true excel doesnt support that behaviour, but thanks to all of u, i hav solved my issue with adding leading and trailing blank columns in my second report. Thanks

SASKiwi
PROC Star

I've used that solution as well. The other option is to convince the customer to accept their reports on different tabs, not always possible I know....

Aman4SAS
Obsidian | Level 7

But i m still fail to do one thing, how to increse hight of lines, becaz its being overlap, i m doing it by cut sort the long line into many sort line, but i believe there must b a solution in sas

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1057 views
  • 0 likes
  • 4 in conversation