PHPExcel - OpenXML - Create Excel2007 documents in PHP - Spreadsheet engine Project providing a set of classes for the PHP programming language, which allow you to write to and read from different file formats, like Excel 2007, PDF, HTML, ... This project is built around Microsoft's OpenXML standard and PHP. Checkout the Features this class set provides, such as setting spreadsheet meta data (author, title, description, ...), multiple worksheets, different fonts and font styles, cell borders, fills, gradients, adding images to your spreadsheet and much, much more!
Want to bookmark this page? Please use http://www.phpexcel.net as the URL.
protected/extensionsSee the following code example:
$data = array( 1 => array ('Name', 'Surname'), array('Schwarz', 'Oliver'), array('Test', 'Peter') ); Yii::import('application.extensions.phpexcel.JPhpExcel'); $xls = new JPhpExcel('UTF-8', false, 'My Test Sheet'); $xls->addArray($data); $xls->generateXML('my-test');
Total 16 comments
i have used this extension and its work fine. but when i save the file on my computer prior to open it, it works, but when i just download/open it, it frozes!
like if i s when i select open with(Microsft)...then file name is changed to test.xls.xlsx how can i fix that ?
The way you use $data in export is not gonna fly. In real wold when you need to pull 10K rows from data using Yii active record, what you get is an array of OBJECTS, not array of array. Consider performance and resource, you cannot convert that array to another array to export.
the "try out demo" link is not working can you fix it?
Try Open Office free software that will save a file in excel format...
Nice extension, very easy to setup...3 minutes. However, i dont own excel and to verify that the spreadsheet is valid i tried to upload to Google docs. However Google doesnt recognize the format. I think ive tried all type of excel documents without any problems in the past so probably the format is broken. Anyone know anything that could help? Will read some docs how to create excel sheets from scratch now. Thank you very much.
how is used font style?
For example _this_
I took a look at the code (just a few lines of code in 2 PHP file) and was unable to find any reference to the Codeplex phpexcel library. It this library used here? As far as I see is impossible to use the advanced functions of Codeplex, this class only allows to create cells and insert simple values creating XML at hand. I'm right?
i have use this extension but fail... :( when I export only show metadata. like this :( http://www.yiiframework.com/forum/index.php?/topic/20626-ask-phpexcel-only-metadata/page__p__100974#entry100974
where i can get documentation for this extensions? or i just use documentation from codeplex? i want to merge some cell and give style, but i don't know how to do.
it's much better then csv )
I've a problem.
I've tried to create a document like in the example. but it create me a excel sheet only with the menu and nothing else
is anybody know what does it mean ?
Is there something about the compattibilities of the document for office 2003 ? I'm making some stuff for persons that use office 2003 and I need to garant that it will work on excel 2003.
there is something in phpexcel about compabitility but it's not present In that extension I see ....is anybody I've something about that ?
Looks pretty promising. Any way to add a new line to a cell? I tried \n, but it just treated it as text.
Thanks!
$this->layout=false;
it is you want to do?
Excellent work. How to remove menu bar from xls page when save? I don't want to export menu bar.
Hard to comment without a download, will you be uploading the file soon?
doodle
Leave a comment
Please login to leave your comment.