$excel = new COM("Excel.application");
$excel->Workbooks->Add;
$excel->Workbooks[1]->WorkSheets->Add;
$excel->ActiveWorkbook->SaveAs('C:\MyDir\test.xls');
$excel->Workbooks->Close;
$excel->workbooks->Quit;
I am trying to save a worksheet using the code above but whenever I try to do this, I...