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 to go through every field from the spreadsheet using Laravel-Excel

I have the following code to read a xlsx spreadsheet but this seems to have some issue: Excel::load($filePath, function ($reader) use ($classId) { // Getting all results $reader->get(); // Loop through all sheets …
Lulzim Fazlija
  • 865
  • 2
  • 16
  • 37
1
vote
1 answer

Load dynamic data from excel using PHPExcel

I hope I can explain this clearly. I display 12 characters represent in time A = 23-1:59 to L = 21-22:59 Everyday have lucky time for example today lucky time are C, D, E and F those need to be bold. If today time is lucky time the character…
POGI
  • 335
  • 1
  • 3
  • 12
1
vote
1 answer

Empty PHPExcel file using liuggio/ExcelBundle in Symfony

I have some code that iterates over the rows and columns of an Excel sheet and replaces text with other text. This is done with a service that has the excel file and a dictionary as parameters like this. $mappedTemplate =…
Jaimy
  • 517
  • 4
  • 20
1
vote
0 answers

PHPExcel takes long time to load xls, fine with xlsx

Good day. I have xls file that looks like this: +----+-------+--------+ | ID | PRICE | STATUS | +----+-------+--------+ | 1 | 1000 | 1 | | 2 | 1000 | 3 | | 4 | 1324 | 5 | | 8 | 3141 | 1 | +----+-------+--------+ As you…
John Black
  • 43
  • 1
  • 5
1
vote
2 answers

Strange error message when trying to generate a PDF

I'm trying to generate a PDF file using the PHPExcel library. I'm using the example file and so far I have changed only the paths to the libraries. Here is my code:
Slim
  • 1,708
  • 5
  • 37
  • 60
1
vote
1 answer

PHPExcel Loop SetCellValue from a custom cell

I need to loop from Cell V1 up to Cell HA1 custom period of DATES. Here is a manual way of doing it: $objPHPExcel->getActiveSheet()->SetCellValue('V1', '2015-11-29'); $objPHPExcel->getActiveSheet()->SetCellValue('W1',…
Ilanus
  • 6,690
  • 5
  • 13
  • 37
1
vote
1 answer

PHPExcel Sorting a sheet and create a new sheet

Here is my situation. I am having one excel sheet that contains 20000 records of different addresses. The data is mapped like this +----+---------+-------+-------+-----+ | Sr | Addr 1 |Addr 2 | State | zip…
Aatman
  • 573
  • 1
  • 5
  • 17
1
vote
0 answers

Don't print the chart in pdf with phpexcel

Currently I'm making my reports with phpexcel, everythink is ok when I make the report with charts in xlsx; ... $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel,'Excel2007'); $objWriter->setIncludeCharts(TRUE); …
gvivetapl
  • 445
  • 1
  • 5
  • 15
1
vote
0 answers

"Undefined index:" when trying to load .xlsx file using PHPExcel

I'm trying to import an .xlsx file into my app. So far it went well with simple files but now I have a complex (formulas, images, charts etc) file and it throws me "Undefined index:" with error in Excel2007.php at line…
Alexandru Coman
  • 165
  • 1
  • 14
1
vote
1 answer

Browser display PHPExcel sheet instead of open "Save dialog" when export

I´m trying to export some data from mysql to "PHPExcel". I would like to have a "Save dialog" rather than saving the file on server. I have google it but cannot find anything more than "Add another header".. so i have been adding alot of headers…
Björn C
  • 3,860
  • 10
  • 46
  • 85
1
vote
0 answers

Embedding VBA code in Excel using PHP

We want to embed macro code in excel sheet using php. We are using PHPExcel to generate a excel workbook, which is successfully generated. Now we just want to embed macro code in this excelsheet.
Naveen
  • 21
  • 1
  • 3
1
vote
1 answer

Fix row each printed page

I need to configure one or more rows as header or footer to be printed on each page. I don't know the numbers of pages to print, it's dynamic. Can I set several rows (or one) to be printed on each page using PHPExcel library?
Reynier
  • 790
  • 9
  • 20
1
vote
1 answer

phpexcel select cell after freezePane()

A) I would like to have a PHPExcel-generated file to open with cell A1 selected. Not a problem: I can do that. B) I would like to have a PHPExcel-generated file with frozen panes (at 'E6', but that's not the real issue). Again, not a problem: I can…
Paulo_M_
  • 23
  • 5
1
vote
2 answers

PHPExcel Fatal error

I have a script to export some data from SQL and format into Excel which is all working fine, for 3 out of 4 things I'm trying to export.. the final one is reporting the following : Warning:…
Adrocks__
  • 39
  • 6
1
vote
1 answer

how to get percentage symbol from excel in PHPExcel

Value in the excel is -45%. How to get percentage (%) symbol while reading excel file using below code. $sheet->getCellByColumnAndRow('A', '3')->getValue() which is giving -0.45 But I need the value as -45% Note: Column A will contain all types…
user2901901
  • 101
  • 1
  • 12