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
8
votes
6 answers

phpExcel: getCalculatedValue() returns #VALUE

Can someone help me with phpExcel Code: This…
8
votes
1 answer

PHPExcel issue for reading date field from excel file

I am facing a problem with the PHPExcel class while i am using that class to read a excel file in my php code. // Reading the excel data $objReader = new PHPExcel_Reader_Excel2007(); $objReader->setReadDataOnly(true); $objPHPExcel =…
Ram
  • 131
  • 1
  • 2
  • 4
8
votes
1 answer

Is it possible to hide an excel sheet using phpexcel?

I'm generating an excel template and I'm using 4 sheets, where 3 are just being used to store data from an array. These data are being used in a data validation list, so I added protection to the 3 sheets I use only to store data, but I'd like to…
sergioviniciuss
  • 4,596
  • 3
  • 36
  • 50
7
votes
1 answer

phpExcel column size issues

I want to make sure that no value is cut off in a workbook produced by phpExcel. To do this I call $oCurrentSheet->getColumnDimension($aCurrentCoords['x'])->setAutoSize(true); every time I write a cell. This doesn't seem to work: Many columns end…
Sheena
  • 15,590
  • 14
  • 75
  • 113
7
votes
2 answers

PHP Excel Calculate Formulas

Im trying print Excel file data on a page. To do it i used PHPExcel lib, all works good, beside printing formulas, i have simple example with such formula =SUM(C2:C5) I print values in a such way: $val = $cell->getValue(); echo '' . $val .…
Anton Sementsov
  • 1,196
  • 6
  • 18
  • 34
7
votes
1 answer

PHPEXCEL to store entries in an array and display

Here is the extract of my code that display the excel entries and stores into array . The logic is first, detect which entry is invalid , mark it down, then for other valid entry, check whether it is duplicate, if it is, mark it down. Eventually ,…
user782104
  • 13,233
  • 55
  • 172
  • 312
7
votes
1 answer

Unescaped Characters in Cell Stop Row Processing PHPExcel

This is a follow-on question from this one: Algorithm to dynamically merge arrays There are unescaped characters in some of the cells in the spreadsheet. I try to escape them with addslashes() but phpexcel seems to ignore this and stop processing…
Mina
  • 610
  • 7
  • 21
7
votes
1 answer

PHPExcel - Reading the Cells and Passing it into MYSQL

I'm trying to use a php script to read an xlsx file, and pass the information from the cells off into MYSQL here is my code, I'm using PHPExcel version 1.7.6 and PHP 5.3.5 require_once 'PHPExcel.php'; $inputFileType = 'Excel2007'; $inputFileName =…
maestro416
  • 904
  • 2
  • 17
  • 31
7
votes
3 answers

PHPExcel: How to get a CELL COLOR

I am using PHPExcel project, but I am having a question in mind, and without solution on the earth. I had googled for this question for a while, but I CAN NOT find a way to get a CELL BACKGROUND COLOR! I tried to use the method 'getColor()' or what…
Jarkid
  • 171
  • 1
  • 4
  • 13
7
votes
3 answers

Retrieving image in PHPExcel

I want to read/retrieve an Image from excel file to PHP using PHPExcel. This code is used to retrieve a value from a particular cell. $objPHPExcel->getActiveSheet()->getCell('B5')->getValue(); This retrieves only the cell value, But i cant…
Salman
  • 115
  • 1
  • 2
  • 8
7
votes
5 answers

PHPExcel exception: "Could not close zip file ... "

I am using XAMPP a Mac for local development, but I used this code at work (using Windows and an otherwise identical development environment) and it worked fine: $objPHPExcel = new PHPExcel(); $sheet =…
tjb1982
  • 2,257
  • 2
  • 26
  • 39
7
votes
1 answer

Reading hyperlink URL

How do I read the URL of a hyperlink within a cell using PHPExcel?
Kevin Laity
  • 2,489
  • 1
  • 27
  • 34
7
votes
1 answer

Getting the Name of a Column from the row and column indexes in PHPExcel

I want to know if it is possible to get the name of a column from the row and column indexes. i.e I want to have a function that would return the name of a column by passing the row index and the column index e.g let's say the name of my function is…
Yanki Twizzy
  • 7,771
  • 8
  • 41
  • 68
7
votes
3 answers

Windows 7: "Excel found unreadable content"

I'm using PHPExcel to generate a very simple .xls file (PHPExcel_IOFactory::createWriter($PHPExcel, 'Excel5')). Whenever that file is opened on Windows 7 using Excel 2010 or 2007, I get the following error: Excel found unreadable content in…
kag
  • 376
  • 1
  • 3
  • 11
7
votes
5 answers

Laravel Excel - Error Allowed memory size

I use Maatwebsite to load excel files. I'm loading fine several documents, until it gives the next error: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in…
user3242861
  • 1,839
  • 12
  • 48
  • 93