# Format excel spreadsheet for results $excel = CreateObject OLE "Excel.Application" || die "CreateObject : $!\n"; $excel -> Application -> {SheetsInWorkbook} =1; $excel -> {Visible}=1; $excel -> Workbooks -> Open; system('cmd /c "C:/WINNT/Profiles/banirt00/Application Data/Microsoft/Queries/remedy_rd.dqy"'); sleep(30); $excel->ActiveWorkbook->SaveAs({xlFileName =>"c:/remedy2.csv", xlFileFormat => xlCSVWindows} ) or warn("Couldnt save file: $!\n"); $excel->ActiveWorkbook->Close ( {xlSaveChanges => False} ); $excel-> Application -> Quit;