Questions tagged [phpexcel]

A PHP library to create, read, edit and write spreadsheet files for MS Excel and other spreadsheet programs

PHPExcel was a library written in pure PHP that provides methods to read workbook files generated by Excel and other spreadsheet programs (Excel 95 and higher .xls and .xlsx, Excel 2003 XML, Comma-Separated Value, SYLK, Gnumeric, and Open/Libre Office Calc .ods); to manipulate spreadsheet data and formatting; and to create/write to various formats (Excel BIFF8 .xls, Excel 2007 .xlsx, Comma-Separated Value, HTML, and PDF).

It is a component of the PHPOffice suite of libraries, comprising PHPExcel, PHPWord, PHPPowerPoint, PHPProject and PHPVisio.

The last production release of PHPExcel was version 1.8.1 in year 2015 via composer and git.

The final notice from PHPExcel is:

The project has not be maintained for years and must not be used anymore. All users must migrate to its direct successor PhpSpreadsheet, or another alternative.

Popular questions

Resources

Documentation

3639 questions
7
votes
6 answers

PHPExcel integration into Zend Framework

how can I integrate the PHPExcel into my Zend app. My actual folder structure is the following: /application controllers views etc... /library My Zend PHPExcel /public index.php I already include 'My' libs by using (in…
lony
  • 6,733
  • 11
  • 60
  • 92
7
votes
1 answer

PHPExcel set same properties, content etc on multiple sheets at once

Is there anyway to set the same properties (colors, row height, alignments) and content (hear names) for all sheets at once with PHPExcel? How? Thank you.
Francisc
  • 77,430
  • 63
  • 180
  • 276
7
votes
3 answers

cell formats in phpexcel

i'm trying to read some excel files with phpexcel, which works ok so far. phpexcel is a bit too clever though, and removes leading zeros from my cells. i guess i need to tell it to treat the cell as a text string, not as general or number. but i've…
fjallstrom
  • 145
  • 1
  • 2
  • 10
7
votes
1 answer

Is it possible to put the text below the image in the header or footer in phpExcel?

Based on phpexcel_library/1.7.4/manual.html I can insert the text below the image, but is there a way to put text under the picture? This is my code for the footer: $workbook = new PHPExcel(); $objDrawing = new…
simhumileco
  • 31,877
  • 16
  • 137
  • 115
7
votes
1 answer

Set auto height in PHPExcel not working

I am generating Excel using PHPExcel. All Code Works Fine.But Auto height code is not Working. I have tried following code. Apply row height on specific row $objPHPExcel->getActiveSheet()->getRowDimension('7')->setRowHeight(-1); Apply row height…
Yasin Patel
  • 5,624
  • 8
  • 31
  • 53
7
votes
1 answer

PHPExcel how to set collapse and expands for groups of row?

Suppose I want to set collapse and expand for row 2 up to 4 as one group, and 8 up to 12 the second group. It means when user want to click on expand + icon of group 1, rows from 2 up to 4 should be visible, and for group 2 row from 8 up to 12…
jones
  • 1,423
  • 3
  • 35
  • 76
7
votes
1 answer

PHPExcel - colspan the subject name

Table name: subject My Expected output My code
Michael Kuan
  • 1,085
  • 3
  • 10
  • 28
7
votes
1 answer

PhpExcel: center align text in a single cell in a set of merged cells

I am using PHPExcel to create a xls file. I have merged the cells (B2:E2), but I want the text entered in B2 to be horizantally center aligned in the B2 cell only. It gets center aligned in the merged cell.…
Neha Dangui
  • 597
  • 2
  • 13
  • 28
7
votes
3 answers

PHPExcel toArray skip first header row

I'm uploading an excel file to website and process it for database use. I'm using toArray() function to get all rows in a php array. But I want to skip the first row ( header title row). The rest of rows will be stored in array. How can I skip the…
Sohan Patel
  • 259
  • 1
  • 3
  • 13
7
votes
3 answers

PHPExcel: Set row height in pixels

I'm using PHPExcel to write a set of images to an Excel file using PHP. Inserting the images doesn't seem to be a problem, however I'm having some difficulties setting the appropriate row height to match the image height. I managed to use…
Jort
  • 1,401
  • 8
  • 23
  • 39
7
votes
1 answer

Is It Possible To Generate Or Clone Pivot Tables Using PhpExcel Library?

Recently i have used phpExcel library to generate reports in excel format in cakephp. Every thing is working fine except pivot Tables. I am using a master excel sheet (Which contain pivot table) to clone/generate other excel sheet. In newly…
Abhijeet Sharma
  • 173
  • 1
  • 2
  • 8
7
votes
1 answer

PHPExcel set default Column Width

Today I had a little problem with excelphp. I wanted to set the default width of the columns manually and only one single time. I found a few solutions also here on stackoverflow which suggested to change the value for every single column (e.g.…
yacon
  • 1,112
  • 1
  • 10
  • 17
7
votes
2 answers

how to add PHPExcel library in laravel?

i want to create new module in laravel which include PHPExcel library. where to put library. how to access it. i have put the PHPExcel library at below location laravel\project\application\libraries\PHPEXCEL it give me error PHP Fatal error: Class…
user2733745
  • 220
  • 2
  • 4
  • 13
7
votes
2 answers

PHPExcel fill the accents as false

I have a problem with PHPExcel library 1.7.9 creating a xlsx. Im using fromArray method to fill a MySQL table into an xlsx, when i try to fill any cell with accents, the cell is filled as "FALSE". This is my code: $query="SELECT Caso, …
7
votes
4 answers

Array to Excel 2007 using PHPExcel

I have this 2 dimensional array that I want to export as an excel file using PHPExcel. // create a simple 2-dimensional array $data = array( 1 => array ('Name', 'Surname'), array('Schwarz', 'Oliver'), array('Test', 'Peter') ); The problem…
Njuguna Mureithi
  • 3,506
  • 1
  • 21
  • 41