BookmarkSubscribeRSS Feed
raveena
Obsidian | Level 7
Hi

I need to get the column header name in bold on the report. And other issue am having an dataset name as age , while opened as the sas dataset I can able view with labels.When am exporting an same dataset to the excel , I didn’t get the labels.

Example:
data age;
set mkk;
label
lineno = 'Line Number'
age = 'Age'
svcdat_sas = 'Date'
poscod = 'Place of Service'
lstnam = ' Last Name'
fstnam = ' First Name'
;
run;

proc export data=age
outfile= "NY\current\c.xls"
dbms=EXCEL replace;
sheet=Age;
run;

I tried with the proc report , I couldn’t make it .Please can you provide me an example to make the header bold and that should reflect while exporting to excel.

Thanks in Advance.
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
PROC EXPORT only exports DATA -- there are no fonts or formatting (such as bold) when you use PROC EXPORT. SAS is exporting data to data -- if you go into an Excel sheet and start typing, there is no additional formatting, unless you add it. When you use PROC EXPORT, it is as though you typed into the cells without any other formatting.

You said you tried PROC REPORT. If you used ODS CSV with PROC REPORT, then again, there is no formatting in a CSV file -- but you would have been able to get labels. On the other hand, if you used ODS HTML, ODS MSOFFICE2K or ODS TAGSETS.EXCELXP with PROC REPORT, then you should have seen formatting and labels in the output.

What ODS destination did you use with PROC REPORT?

cynthia
Andre
Obsidian | Level 7
Proc export has a label option but

Bolding is a matter of ODS

Andre
AlbertoLupo
Calcite | Level 5

ods excel file="name.xlsx";

 

proc print data =sashelp.cars label noobs;

run;

 

ods close;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3754 views
  • 0 likes
  • 4 in conversation