generating the excel file

Topics: Developer Forum, User Forum
Sep 6, 2012 at 7:07 AM

unable to get the 01simple.php output

Sep 6, 2012 at 10:48 AM

If you read the 01Simple.php code, you'll see that it's providing a filename to the save method: the file will be saved in the same directory as the script, and with the same filename as the script but an extension of .xls, .xlsx etc as appropriate

Sep 6, 2012 at 11:38 AM

I had gone through the code and its a simple code. but for me it is not unable to write the file. because of null it is exiting from the code. that's why i rised this.

Sep 6, 2012 at 11:59 AM

If this really is an issue - and believe me I do actually run those tests before releasing, so I think I might have noticed something - then please detail exactly what is happening, and where this NULL is in the code. PHP is generally thoughtful enough to at least provide an error message if it fails

Sep 6, 2012 at 12:19 PM

I don't say it is an issue with u because here in wamp server i can see that the code is able to create the file sucessfully. But when i running it on my office server it is exiting from the execution at this step in IOFactory.php :

$instance = new $className($phpExcel);
                if ($instance !== NULL) {
                    return $instance;

here it is geting NULL, i think the actual problem is at $objPHPExcell = new PHPExcell().


So can you please help me out why it is prividing NULL or why the $objPHPExcell is creating?

Sep 6, 2012 at 1:00 PM

So what is different with your office server? Are you running other applications, frameworks, etc? If it's exiting, what error messages are you getting?

Enable debug to get a stack trace.

Sep 6, 2012 at 1:16 PM
Edited Sep 6, 2012 at 2:52 PM

from where can i get this? PHPExcel_Settings::getZipClass();

from which file or location?

Sep 6, 2012 at 4:42 PM

By default, PHPExcel uses PHP's built-in ZipArchive class. The PHP manual describes how to enable it for different versions/platforms of PHP