Help using Base SAS procedures

print title in column B instead of column Ausing ODS excelXP

Reply
Regular Learner
Posts: 1

print title in column B instead of column Ausing ODS excelXP

Hi All,

  I am trying to export multiple tables to a single sheet in excel using ODS Excelxp. This file is then fed as an input to another application. My data sets are customized to start at column B where as the title of each table is starting at column A. I need the titles also to start at column B. Attached is my sample code. Can someone help?

ods tagsets.excelxp file='C:\Temp\a.xls'

options( sheet_interval='none' sheet_name= 'sheet1' HIDDEN_COLUMNS = '1' embedded_titles="yes" skip_space='1,0,0,0,0' absolute_column_width = '0,4,4,4,4,4');

 

proc report data=index1 nowd;

title ' ';

title2 justify=center "First table";

title3 ' ';

column new new_col new_col1 new_col2 new_col3 new_col4 new_col5 new_col6 BBA1 BBA1_D LIBOR3 LIBOR6 LIBOR12 CMT1 CMT3 CMT5 CMT7 CMT10;

define new_col / display ' ';

define new_col1 / display ' ';

define new_col2 / display ' ';

define new_col3 / display ' ';

define new_col4 / display ' ';

define new_col5 / display ' ';

define new_col6 / display ' ';

define BBA1 / display 'A1';

define BBA1_D / display 'A1_D';

define LIBOR3 / display 'R3';

define LIBOR6 / display 'R6';

define LIBOR12 / display 'R12';

define CMT1 / display 'T1';

define CMT3 / display 'T3';

define CMT5 / display 'T5';

define CMT7 / display 'T7';

define CMT10 / display 'T10';

run;

proc report data=CF_ddc nowd;

title 'Second table';

title2 ' ';

column new Group prepay_units prepay_Scenario_a prepay_Scenario_d prepay_Scenario_f Index_Type Index_Rate_Scenario new_col new_col1 new_col2 new_col3;

define Group / display 'Group';

define prepay_units / display 'Units';

define prepay_Scenario_a / display 'Scenario';

define prepay_Scenario_d / display ' ';

define prepay_Scenario_f / display ' ';

define Index_Type / display 'Type';

define Index_Rate_Scenario / display 'Rate';

define new_col / display ' ';

define new_col1 / display ' ';

define new_col2 / display ' ';

define new_col3 / display ' ';

run;

proc report data = Dec_ddc nowd;

title 'Third table';

title2 ' ';

column new Group prepay_units prepay_Scenario_a prepay_Scenario_ab prepay_Scenario_b prepay_Scenario_c prepay_Scenario_d prepay_Scenario_e prepay_Scenario_f new_col4 new_col5 new_col6 Index_Type Index_Rate_Scenario new_col new_col1 new_col2 new_col3;

define Group / display 'Group';

define prepay_units / display 'Units';

define prepay_Scenario_a / display 'Scenario';

define prepay_Scenario_ab / display ' ';

define prepay_Scenario_b / display ' ';

define prepay_Scenario_c / display ' ';

define prepay_Scenario_d / display ' ';

define prepay_Scenario_e / display ' ';

define prepay_Scenario_f / display ' ';

define new_col4 / display ' ';

define new_col5 / display ' ';

define new_col6 / display ' ';

define Index_Type / display 'Type';

define Index_Rate_Scenario / display 'Scenario';

define new_col / display ' ';

define new_col1 / display ' ';

define new_col2 / display ' ';

define new_col3 / display ' ';

run;

ods tagsets.excelxp close;

Ask a Question
Discussion stats
  • 0 replies
  • 198 views
  • 0 likes
  • 1 in conversation