Hi, I found the following MACRO http://www.google.com/url?sa=t&rct=j&q=macro%20exdde%20sas&source=web&cd=2&cad=rja&ved=0CDUQFjAB&url=http%3A%2F%2Fwww2.sas.com%2Fproceedings%2Fsugi29%2F082-29.pdf&ei=xRcQUZmNAYig8QTaxoCYAw&usg=AFQjCNFmUvtPwRiiumePY9QR6f9cs4uPFQ&bvm=bv.41867550,d.eWU to use in SAS; however, I get an error message when I use it. What could be the problem? Also, if there is another way to import data from Excel (preferably xlsx into SAS and be able to systematically format variables), please let me know. 2247 %EXDDE(/*** 1. Parameters related to the input Excel file ***/ - 180 WARNING: Apparent invocation of macro EXDDE not resolved. ERROR 180-322: Statement is not valid or it is used out of proper order. 2248 Excel = ON, /* = ON, the Excel file is open; otherwise, the macro opens the Excel file */ 2249 Xlsexe =C:\Program Files (x86)\Microsoft Office\Office14, /* Location of Microsoft Excel 2249! on the C: drive */ 2250 Rawdir =U:\HC Diabetes\datacuts, /* REQUIRED. Input Excel file directory */ 2251 File = DM_Pilot_revisions_09242012, /* REQUIRED. Input Excel file name */ 2252 Sheet = Sheet4,/* Worksheet name(s), e.g., Sheet1|Sheet2. Sheet1 by default. */ 2253 Lrecl = 60, /* Length of the Excel file, default is 256 */ 2254 StartR =2, /* Row number of the 1st cell to read */ 2255 StartC =1, /* Column number of the 1st cell to read */ 2256 EndR =11, /* Row number of the last cell to read */ 2257 EndC =60, /* Column number of the last cell to read */ 2258 /*** 2. Parameters related to the output SAS dataset ***/ 2259 Var =, form IDcode_new TTMID race_ethnicity race_other startdate enddate 2259! Diabetes_type_1 Diabetes_type_2 Diabetes_type_no Diabetes_type_unkn Diabetes_screen 2259! Wt_baseline Hba1c_baseline DOB_claims DOB_chart Gender_chart Gender_claims 2259! education_completed employment T2Dm_date Chart_type height_value Height_units 2259! Smoker years_smoked units_smoker BMI_values BMI_1 BMI_2 BMI_3 BMI_4 2259! HbA1c_1 Weight_1 weight_units_1 weight_date_1 Weight_2 weight_units_2 Weight_3 2259! weight_units_3 Weight_4 Weight_5 Weight_6 weight_units_6 weight_units_5 2259! weight_units_4 weight_date_2 weight_date_3 weight_date_4 weight_date_5 2259! weight_date_6 Weight_7 weight_units_7 weight_date_7 Weight_8 weight_units_8 2259! weight_date_8 weight_units_9 Weight_9 weight_date_9 2260 Fmt = best32. 10. 14. 2. $32. mmddyy10. mmddyy10. 2. 2. 2. 2. 2. 10. 10. 2260! mmddyy10. $10. 2. $10. 2. 2. $10. 2. 10. 2. 2. 10. 10. 2. 10. 10. 10. 2260! 10. 10. 10. 2. $10. 10. 2. 10. 2. 10. 10. 10. 2. 2. 2. $10. $10. $10. 2260! $10. $10. 10. 2. $10. 10. 2. $10. 2. 10. $10., 2261 Dum =, /* Extraneous variables need to be dropped */ 2262 Flag =001, /* Flag for the sub-sheet origin of the data */ 2263 Outdata= dm, /* REQUIRED. Output SAS data set name */ 2264 2265 /*** 3. Process related parameters ***/ 2266 Sleep =, /* Seconds that SAS is suspended from execution while opening up the Excel file 2266! */ 2267 Debug = /* Whether to keep intermediate data sets, default=NO */);
... View more