PHPExcel browser output Excel2007 error
Jul 30, 2016 pm 01:30 PMClick here to view the code

<span style="white-space:pre"> </span>/*解决Excel2007不能导出*/ function SaveViaTempFile($objWriter){ $filePath = '' . rand(0, getrandmax()) . rand(0, getrandmax()) . ".tmp"; $objWriter->save($filePath); readfile($filePath); unlink($filePath); }
Click here to open the original text
Replace the save method with the above code SaveViaTempFile($objWriter);
Running result picture:
Click here to open the source code
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the error when PHPExcel browser outputs Excel2007, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Build a React App With a Laravel Back End: Part 2, React

Simplified HTTP Response Mocking in Laravel Tests

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon
