genetate routine from xls file