BookmarkSubscribeRSS Feed
SuryaKiran
Meteorite | Level 14

Hi All!

 

I want to remove the BOX in proc tabulate. I want all in one line beacuse I will export to excel. Capture11.PNG

 

 

I need Excel like this :

Capture1.PNG

 

 

 

 

Thanks,
Suryakiran
3 REPLIES 3
ballardw
Super User

The box is going to remain, better would be to actually use it. Or move to Proc report.

You don't give any variable names but it looks like you may be using the sashelp.cars data set.

 

Please look at this code as an example:

proc tabulate data=sashelp.cars;
   class origin make type;
   table origin=""*make="",
         type=""*n=""
         /box = "Origin     Make" misstext="0";
run;

Of course the question could be what will be done after this is in Excel...

 

SuryaKiran
Meteorite | Level 14

Yes I used SASHELP.CLASS as example. I need to create report in excel and send to markets. So that then can create pivot tables from this excel. I need 1st row with column names and from 2nd row data starts.

Thanks,
Suryakiran
ballardw
Super User

You want to switch to Proc Report to get the individual columns.

Or possibly summarize data, transpose and use proc print.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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