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

php excel file generation not working with cron job

I create a file to write an excel using phpexcel classa dne sending that via email whileiam running tht file directly its working fine. But if i set it as a cron job its not working. I checked all the file path used in that file cant find any…
1
vote
1 answer

PHPExcel for loop timeout

I have this code where I want to set from 3 to 333 to have a certain row height at every 30 interval, meaning at row 3, 33, 63, 93 up till 333: for ($i=3; $i<340; $i+30){ …
NewbieCoder
  • 676
  • 1
  • 9
  • 32
1
vote
0 answers

PHPExcelReader files doesn't load

I am using PHPExcelReader to read an Excel sheet. Here is my code.
Rose18
  • 2,892
  • 8
  • 47
  • 98
1
vote
1 answer

PHPExcel RichText Excel5 Office 2007 complains at error

I've tried to use RichText and mostly it works fine but sometimes (one case to 20) Microsoft Offices fails to open certain documents saying that they are broken. The code is: $objRichText = new PHPExcel_RichText(); …
Tebe
  • 3,176
  • 8
  • 40
  • 60
1
vote
1 answer

PHPEXCEL getCalculatedValue or getFormattedValue returns fatal error

I have a file with mime-type "application/octet-stream; charset=binary" and extension ".xlsx". PHPExcel_IOFactory::identify($this->file) returns 'Excel2007'. I create my reader like this: $this->objectReader =…
Lachezar Raychev
  • 2,113
  • 4
  • 24
  • 34
1
vote
1 answer

Zend_mail send duplicate attachment

I am using phpexcel library with zend framwork. I want to send mail to user with excel file attachment, all are working good but mail send with two attachment one is duplicate, i dont know why. here is my function which is used to export excel and…
Mr. Tomar
  • 355
  • 3
  • 5
  • 22
1
vote
0 answers

PHP group by date, output to Excel

I have data that includes a day column. There are upwards of 400 row for each day. I'd like to export each day's data in to their own Excel sheet. To group the data I'm using SELECT * FROM mydata GROUP BY DATE(mydata.day);. How can I get all that…
DT.DTDG
  • 765
  • 1
  • 13
  • 31
1
vote
0 answers

How can I use PHPExcel to update a chart with different data?

I am using PHPExcel to read an Excel template and then write another excel file based on that model. In my model I have 2 sheets: the first one named "Data" contains sample Data. The 2nd sheet contains a graph using the data of the first…
hy0shi
  • 271
  • 4
  • 12
1
vote
1 answer

Yii, PHPExcel throwing Fatal Errors

I have imported PHPExcel into /protected/extensions/phpexcel, followed all the steps. Created an action to call the createExcel action. But I get this error: Fatal error: Class 'Controller' not found in …
NewbieCoder
  • 676
  • 1
  • 9
  • 32
1
vote
0 answers

Creating a style-array automatically from an existing worksheet using PHPExcel

Is there a way to create a $styleArray automatically from a existing Excel worksheet using PHPExcel? Something like: $styleArray = $file->getSheetByName('XY')->getStyles()-> copyAllStylesInRangeAndCreateStyleArray($range); So I could use this…
kratsching
  • 75
  • 1
  • 9
1
vote
1 answer

PHPExcel generatting some random characters?

I have the task of generating the excel sheet of each and every student separately so I used PHPExcel lib to perform the task
user4706838
1
vote
1 answer

PHPExcel Writer object uses huge memory and time outs eventually

I am creating a excel sheet using: Codeigniter 2.2.1 PHP 5.4.25 Apache 2.4.7 XAMPP 1.8.2 PHPExcel 1.8.0 I am fetching 35000 rows (mostly empty) with 79 columns from database and writing to excel file (Excel5). It works just fine for 30000 rows…
1
vote
2 answers

PHPExcel ReadFilter Class

I am attempting to use a ReadFilter with PHPExcel to only read in certain columns. I am using the example from their documentation: class columnFilter implements PHPExcel_Reader_IReadFilter { private $_startRow = 0; private $_endRow = 0; …
hiddenicon
  • 551
  • 2
  • 11
  • 23
1
vote
1 answer

PHPExcel: Setting column width based on column number

i am using PHPExcel & searched a lot to get the result for setting the column width based on column number. I found results based on column id's but couldnt find any result for setting width based on column number. I am asking to know about, based…
Shaggie
  • 1,799
  • 7
  • 34
  • 63
1
vote
1 answer

PHPExcel: Can't set index number & last column value as "Date"

i am new to PHPExcel learning from last two days and i am generating one report for the form input data. I have generated dynamically columns in the excel report but not able to set the first column as Index & last column as Date. My code is: //…
Shaggie
  • 1,799
  • 7
  • 34
  • 63
1 2 3
99
100