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.
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
See 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');
Change Log ¶
January 27, 2010 ¶
- Initial release.
Doesn't work
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 ?
2003 compatibility
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 ?
new line?
Looks pretty promising. Any way to add a new line to a cell? I tried \n, but it just treated it as text.
Thanks!
reply to neel
$this->layout=false;
it is you want to do?
Good Job
Excellent work. How to remove menu bar from xls page when save? I don't want to export menu bar.
Any chance you can upload the file?
Hard to comment without a download, will you be uploading the file soon?
doodle
Thank you
it's much better then csv )
documentation
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.
only metadata
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
PHPExcel is used here??
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?
font style
how is used font style?
For example this
Nice extension
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.
@nights
Try Open Office free software that will save a file in excel format...
why demo link is not working?
the "try out demo" link is not working can you fix it?
This need some changes
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.
how to save generated file
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 ?
Hi Its not working my dynamic array couold any body solved it
I am trying to export my custom array to the excel sheet but its not working. My custom array is dynamic array wihc has the following format. Note that the it has no comma seperated array value so its not working for me. So i am searching for solution.
$data = array( 1 => array ('Name', 'Surname') array('Schwarz', 'Oliver') array('Test', 'Peter') );
Turkish character problem.
Hi!
I have an error with my array data as follows.
$data = array( 1 => array ('İSİM', 'SOYİSİM'), array('İŞÇÖ', 'ÇŞÖŞÜĞ') ); Yii::import('application.extensions.phpexcel.JPhpExcel'); $xls = new JPhpExcel('UTF-8', false, 'My Test Sheet'); $xls->addArray($data); $xls->generateXML('my-test');
Above characters are turkish . How can i fix the problem ?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.