BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
labin
Fluorite | Level 6
On the excel sheet, the labels are not printing. It is using the column names instead. What am I missing in my code? 
ods EXCEL file="\\networkfilepath_&SYSDATE..xlsx" ; 

ods EXCEL options(sheet_name='Negative Margin Audit');
proc print data=work.AP_Audit_NegMgn3

style (header) = {background=cyan}
style (grandtotal) = {background=cyan} ;


format order_margin dollar10.2;
format movement_margin dollar10.2;
format total_charge dollar10.2;
format Carrier_Pay dollar10.2;
format Carrier_Extra_Pay dollar10.2;
format Carrier_Total_Pay dollar10.2;
label order_id = 'Order ID'
movement_id = 'Movement ID'
Dispatcher_User = 'Dispatcher User'
office_code = 'Dispatcher Office'
operations_user = 'Operations User'
customer_id = 'Customer ID'
revenue_code_id = 'Revenue Code'
override_payee_id = 'Carrier Code'
Order_Status = 'Order Status'
bill_distance = 'Order Distance'
total_charge = 'Revenue'
Carrier_Pay = 'Carrier Pay'
Carrier_Extra_Pay = 'Carrier Extra Pay'
Carrier_Total_Pay = 'Carrier Total Pay'
Order_Margin = 'Order Margin'
movement_margin = 'Movement Margin'
processing_status = 'Processing Status'
Broker_Commission_Eligible = 'Broker Commission Eligible'
bol_received = 'BOL Received'
Delivery_Date = 'Delivery Date'
ordered_date = 'Ordered Date'
Dispatch_Date = 'Dispatched Date'
Origin_City = 'Origin City'
Origin_State = 'Origin State'
Destin_City = 'Destination City'
Destin_State = 'Destination State';

sum order_margin;
sum movement_margin;
sum total_charge;
sum carrier_pay;
sum carrier_extra_pay;
sum carrier_total_pay;
run;

ods EXCEL close;
/*Create EXCEL file using work table data*/
1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Rhodochrosite | Level 12

Have you tried specifying the LABEL option in the PROC PRINT statement?

View solution in original post

1 REPLY 1
WarrenKuhfeld
Rhodochrosite | Level 12

Have you tried specifying the LABEL option in the PROC PRINT statement?

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
  • 1 reply
  • 1116 views
  • 0 likes
  • 2 in conversation