BookmarkSubscribeRSS Feed
songsujing
Fluorite | Level 6

I used proc report and ods excel destination to generate excel file, but I would like to make the data in excel  to be table , not list . what I mean in excel when you chose data area and click control + T  the data area will convert into a table. Is there ods excel option to do this automatically or other ways to do this in SAS? 

 

Thanks a lot

 

3 REPLIES 3
ballardw
Super User

Suggest show the code you use for creating your output. Include the ODS destination statements as well as the procedure.

 

That we it will at least be possible to tell if you are not using options that make this impossible.

songsujing
Fluorite | Level 6

data test;

input a b c ;

card;

1 2 3

4 5 6

;

run

ods excel file = "desktop/test.xlsx" options(sheet_name = "Test" autofilter="All");

proc report data = test missing;

column a b c;

define a / display 'A' left ;

define b / display 'B' left ;

define a / display 'C' left ;

run;

ods excel close;

in the excel file sheet test, for data range a1: c3, I like to convert it to table in excel. How do I do it by SAS programming instead of I manually go to the excel, choose data range and press ctrl+T to convert it to table?

Thanks a lot  

 

Sajid01
Meteorite | Level 14

Tables in excel are essentially named range of cells with header and data. It is essentially an excel feature.
SAS documentation does not list it. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p09n5pw9ol0897n1qe04zeur27rv.htm)

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 942 views
  • 0 likes
  • 3 in conversation