Pear and excel

I use pear to create excel files (with cakephp) and I want to send it as attachment.
So I want to save it to the server.
How can I do that?

$workbook =
 new Spreadsheet_Excel_Writer(time().'machine.xls');
$workbook->setVersion(8);
.....
$workbook->close();

The time().‘machine.xls’ is not saving at the server

I managed to solve it

 $file=
ROOT.DS.APP_DIR.DS.WEBROOT_DIR.
DS.'tmp'.DS.time().'machine.xls';
$workbook = new Spreadsheet_Excel_Writer($file);