set safety off use ? als1=alias() if !empty(als1) gcdelimname =alias() + '.xls' gcdelimfile = putfile('excel_file:', gcdelimname, 'xls') if !empty(gcdelimfile) copy to (gcdelimfile) type xl5 && Create delimited file endif res=messagebox("Do you want to Open &gcDelimName",4+32+512,"Dbf2Xls") if res=6 loexcel = createobject("Excel.Application") loworkbook = loexcel.workbooks.open(gcdelimfile) losheet = loworkbook.sheets(1) && or pass the name of your sheet as a string! losheet.columns().autofit() loexcel.visible = .t. && display Excel endif endif