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
1
vote
1 answer

How do I get a range of cells to each cell name array in PHPExcel?

I am using PHPExcel to put some comments to cells. But if I put range, than I see error: Cell coordinate string can not be a range of cells. I need a function that can convert my range to array of cells for loop. For example, if I have (A6:A11) =>…
Sogl
  • 782
  • 3
  • 9
  • 29
1
vote
0 answers

PHPExcel: formattedValue() returns dates in "dd/mm/yyyy" format instead of custom "yyyy-mm-dd" as defined in the .xls/.xlsx files

I am working on a system that needs to accept Excel files (.xls as well as .xlsx files), these files consist of several columns: date, location, time, etc. The date and time cells are formatted as how the user wants it to formatted. The date format…
Jelmer
  • 2,663
  • 2
  • 27
  • 45
1
vote
1 answer

PHPExcel: How can I use a combination of dynamic rows and fixed rows in PHPExcel?

I am looking for advice on methodology here I guess. I have an excel spreadsheet with areas which require a dynamic number of rows to be inserted, which is followed by fixed areas which require data to be added to specific col/row fields. I want to…
Ben Hull
  • 157
  • 8
1
vote
0 answers

How to generate xml using PHPExcel

I am using PHPEXcel library to convert Excel files (.xls, .xlsx) to XML. I have written below code to convert Excel file to arrays. but finding issues with how to convert that array in XML format.
Adoshi
  • 33
  • 6
1
vote
2 answers

PHPEXCEL set footer on the left

I'm trying to set footer on the left side on my Excel sheet using phpExcel. I wrote this code but it didn't work : $sheet->getHeaderFooter()->setOddFooter('myFooter'); By the way, I took a look at the documentation for the HeaderFooter Class but…
drew02
  • 13
  • 1
  • 3
1
vote
1 answer

PHPExcel : CodeIgniter error on output

I have this controller which renders my data from database to the PHPExcel library. https://arjunphp.com/how-to-use-phpexcel-with-codeigniter/ this is my controller : public function downloadTournamentData() { …
godheaper
  • 1,695
  • 2
  • 14
  • 21
1
vote
0 answers

phpexcel exception with upload file

I am using PHPExcel for upload xls files. when I upload this file (https://drive.google.com/file/d/0B9Hz_h5HT4slblFrSlljTDNwWE0/view?usp=sharing), I have error in $objPHPExcel = PHPExcel_IOFactory::load($this->file_path); line public function…
user1142806
  • 79
  • 1
  • 6
1
vote
2 answers

PHP Excel - Set cell or Column Direction (RTL)

I'm looking for a way to set the "Direction" of a cell in Excel from PHP Excel. I've gone over any documentation i could find and found only the option to set the direction for a sheet, however, it does not affect the cell direction but rather, only…
Boaz Yahav
  • 169
  • 2
  • 11
1
vote
2 answers

PHPExcel loop through rows and columns

Need help identifying weird problem that i'm facing. I did tried searching in stack overflow but didn't find any possible answer. Here is sample program that works displaying all rows and columns on…
Amod Gokhale
  • 2,346
  • 4
  • 17
  • 32
1
vote
1 answer

phpexcel fill colors doesn`t work

I'm trying to stylize the rows(fill color), using PHPExcel. But I have a problem. There are near 100 rows, but PHPExc el 'getStyle' doesn`t work after 30-40 rows. I`m trying this code in the loop: $color_start=array( 'fill' => array( …
Pavel
  • 11
  • 2
1
vote
1 answer

PHPExcel not recalulating and shows always the same value

I am on a project and I am reading values from an excel document. When using the getCalculatedValue function it does always return the same value. I tried the getOldCalculatedValue function without success. I read somewhere that it will be helpful…
Demetris
  • 11
  • 2
1
vote
0 answers

PHPExcel incorrect populating cells

I'm trying to put proper values into appropriate cells but cannot figure it out Let me show you what I'm trying to accomplish Correct Output but instead it shows me thatIncorrect Output So, I've began with a simple while loop to loop for records…
Besmir Sadiku
  • 75
  • 1
  • 7
1
vote
2 answers

PHPExcel generated file via $objWriter->save('php://output')- does it require permissions?

I have a code in php CodeIgniter that extracts data from database and generates an xls file via PHPExcel. The problem is that whenever I upload the code into another server, it generates an .xls file with 0kb, and the error while opening is: "Excel…
abhisekG
  • 426
  • 2
  • 5
  • 16
1
vote
0 answers

PHPExcel unreadable content

I am making an .xlsx file then send it via email. But when I received the file in my email. It says "unreadable content" and try to recover it. When I recover it the file is complete and intact. Nothing is missing. But I don't want that error box to…
aozora
  • 423
  • 3
  • 13
1
vote
2 answers

PHPExcel - duplicateStyle() seems not to work / does nothing

Im making an export for my company which takes soma data, given through PHP, and outputs them to a excel spreadsheet. Everything works well, except for one little thing. Im conditionally formatting some cells to have a specific color. Neither I get…
Dr. Gadget
  • 303
  • 1
  • 3
  • 10