1

For example, I have a table like this:

A   N  
A   Mean 
A   Min 
A   Max

I'm using ODS tagsets.excelXP to export this data to Excel. In Excel, i don't want my first column to repeat "A" 4 times. I want to fuse the 4 rows of this column. Basically,i want a big cell containing the value A.

     N
  A  Mean
     Min
     Max

Can you tell me how to do that please?

Update:

For the rows fusion, i did this:

proc report data=... spanrows;

define A/order; (delete the duplicated rows of the variable A)

run;

Community
  • 1
  • 1
buiquanghai
  • 81
  • 1
  • 6
  • Have you tried proc report or tabulate so far? – kl78 Jun 25 '15 at 10:16
  • Thanks, it worked with proc report. – buiquanghai Jun 25 '15 at 12:24
  • By the way, can you show me how to adjust "center" and "autofit" of each cell in my output table in Excel please? – buiquanghai Jun 25 '15 at 12:32
  • Have a look here: http://support.sas.com/rnd/base/ods/odsmarkup/TipSheet_ods_xl_xp.pdf there you find autofit and center along with other formating options – kl78 Jun 25 '15 at 13:06
  • Thank you. I used the option spanrows of proc report to fuse my cells. But now the value is in the bottom of that new big cell. I tried to use ODS option(center_vertical) and proc report option (Vjust) but both don't work. – buiquanghai Jun 25 '15 at 13:53
  • Buiquanghai - please update the question with what you've got going so far, particularly with a sample dataset and the code you've done so far, and how close you've gotten. Also, if you do succesfully complete this, unless someone else writes an answer, please write one yourself so others can see the solution! – Joe Jun 25 '15 at 14:25
  • If you still got problems with adjusting maybe this article is interesting for you:https://communities.sas.com/message/120430 i tested with vjust and it worked fine for me – kl78 Jun 25 '15 at 14:46
  • @kl78 did you test the vjust with the big cell? (the result of the spanrows statement) – buiquanghai Jun 26 '15 at 07:42
  • yes, i just tested the example from cynthia in my last link with your data, and it worked correct. Only applied it on the a column – kl78 Jun 26 '15 at 08:56
  • @kl78 Can you post your code that you tested please ? – buiquanghai Jun 29 '15 at 08:35
  • Sorry i found the problem. My version of tagsets.excelxp is too old. I updated the new version and it worked now. – buiquanghai Jun 29 '15 at 09:52
  • Buiquanghai- If you copy and paste your PROC REPORT sample code into an answer, you can accept that answer and get points, and also it will stop showing this question to others as unanswered. Thanks – Snorex Feb 01 '17 at 17:32

0 Answers0