Fatal error: Call to undefined method PHPExcel_Writer_Excel2007::setTempDir()

Topics: Developer Forum, Project Management Forum, User Forum
Jul 2, 2009 at 11:37 AM

Hello i am triing to set a new dir where save my excel file.

I have this kind of error. Somebody can help me?

Fatal error: Call to undefined method PHPExcel_Writer_Excel2007::setTempDir()

$tempDir = "/Report/FileExcel";

$objWriter->setTempDir($tempDir);

$objWriter->save('test.xls');

 

i hope will help me thanks very much.

C.

Developer
Jul 2, 2009 at 11:51 AM

If you want to save to some existing directory, it should be possible to do like this:

$objWriter->save('somedir/test.xls');

The setTempDir() method does not have anything to do with where the final Excel file should be saved, and you may have mixed up methods for Excel5 writer and Excel2007 writer.

Jul 2, 2009 at 11:57 AM

thanks very much now it's ok.

:)

C.