Data visualization with SAS programming

Different col width in single sheet for 2 report

Reply
Super Contributor
Posts: 266

Different col width in single sheet for 2 report

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?

Super User
Super User
Posts: 7,710

Re: Different col width in single sheet for 2 report

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.

Super User
Posts: 11,114

Re: Different col width in single sheet for 2 report

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.

Super Contributor
Posts: 266

Re: Different col width in single sheet for 2 report

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

Super User
Posts: 3,233

Re: Different col width in single sheet for 2 report

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....

Super Contributor
Posts: 266

Re: Different col width in single sheet for 2 report

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

Ask a Question
Discussion stats
  • 5 replies
  • 420 views
  • 0 likes
  • 4 in conversation