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
3 answers

How to get data from multiple mysql table using single query

I am using below code to export columns from two mysql table to an excel file using phpexcel. I am achieving it by running the query twice. Can someone help me on how to get this done by running only one query and using LIKE and UNION maybe. Thank…
PeeJay
  • 323
  • 4
  • 16
1
vote
1 answer

php Script takes more and more time after each iteration

I'm using PHPExcel to create excel files using php. First take look at below code, the problem with this code is, After saving some amount of data into excel it only remains in process but doesn't saves anything. I think the script saves any data to…
1
vote
1 answer

PhpExcel Formulas

I'm working with PhpExcel 1.8.0 in Codeigniter 3.0.0, Codeigniter is running in WAPP Stack Server 5.4.39-0 (all of them should be the latest versions, i think). This: $this->excel->getActiveSheet()->setCellValue('G5', "SUMA(G1:G4)"); Displays the…
Azura
  • 86
  • 1
  • 11
1
vote
3 answers

How to convert full excel to PDF with maatwebsite?

I make a report with maatwebsite and download it to xls and works fine, but now I need to export it to PDF, so when it exports to PDF only returns the first page, even if has multiple sheets. Excel::create('name', function ($excel) { foreach…
Nesuferit
  • 21
  • 1
  • 5
1
vote
0 answers

PHPExcel_IOFactory::load() from php://memory

I'm trying to load an excel file from 'php://memory' stream. Here's my code: $path = 'http:///test.xls'; $temp_file = fopen('php://memory', 'w+'); $file_contents = file_get_contents($path); fwrite($temp_file, $file_contents); $objPHPExcel…
Zaxter
  • 2,939
  • 3
  • 31
  • 48
1
vote
0 answers

How to resize the image for get the image from db in PHPExcel?

$objDrawing = new PHPExcel_Worksheet_Drawing(); $objDrawing->setName('Image Name'); $objDrawing->setDescription('Sample'); $objDrawing->setPath('C:/Users/Downloads/'.$image); $objDrawing->setHeight(100); $objDrawing->setWidth(100); …
Saravanan Selvam
  • 163
  • 1
  • 5
  • 17
1
vote
0 answers

Exporting table from SQL into Excel with PHPExcel

I'm using this example in order to write to Excel from my SQL DB. Most of my data is in cyrilllic, so i am using utf8_unicode_ci(can be seen in code) encoding. The issue is as follows: module writes into file, but its contents are unreadable due to…
1
vote
0 answers

Saving value in database having type time using doctrine 2 orm

I'm trying to save data using ZF2 Doctrine ORM Module using dynamic paramter as entity class name and initializing its object and saving data using dynamic values from excel sheet header, $time =…
Vipul
  • 655
  • 2
  • 6
  • 22
1
vote
1 answer

PHPExcel Reading date from CSV

I have a CSV file containing date values. Eg. 3/1/2015 But with my current code $rowData[$i][0][6] = date('Y-m-d', PHPExcel_Shared_Date::ExcelToPHP($upper[0][6])); it reads it as 2036-02-09. I know PHPExcel is best used with xls and xlsx, but my…
Paul Ryan Lucero
  • 521
  • 1
  • 3
  • 16
1
vote
1 answer

Export to excel xls not working on live server

I am trying to export the gridview to the excel xls in Yii. For this I used PHPExcel extension. It is working on localhost but not on live server. Following is my model function: public function downloadOrderReport($model){ …
Chinmay Waghmare
  • 5,368
  • 2
  • 43
  • 68
1
vote
1 answer

Wrong reference to cell in PHPExcel

I'm developing importer based on PHPExcel library. This piece of code saves the cells for later usage. foreach ($this->importModel->currentAttributeNames as $columnLabel => $attribute) { $cell = $this->_sheet->getCell($columnLabel .…
arogachev
  • 33,150
  • 7
  • 114
  • 117
1
vote
2 answers

(PHP) Save file in folder to computer

I'm using PHP (PHPExcel) to handle all the excel files. Currently I have saved a "New Template.xlsx" in a folder. And now I want the users to be able to download the "New Template.xlsx" at a click of a button. How do i do that with php or phpexcel…
1
vote
0 answers

PHPExcel - read matrix excel starts with column

I'm new using PHPExcel. I have some issues with it. I have an Excel like this: Which in the row 3 are my origin locations and in the column B my destination. What i need to do is read this data to save in a database table. For example, my table…
Jhonatan Sandoval
  • 1,283
  • 6
  • 24
  • 40
1
vote
2 answers

phpexcel not working in cakephp 1.3

I am trying to create and download excel file using PHPExcel in my CakePHP 1.3 application, But its not working. My code:- App::import('Vendor', 'PHPExcel', array('file' => 'Classes/PHPExcel.php')); $objPHPExcel = new PHPExcel(); // Set document…
Archana
  • 359
  • 2
  • 5
  • 14
1
vote
1 answer

Get value from a certain row in a column

I currently have the below code that will loop through the excel file and return rows with missing data. the output is as below: - Row number: 37 - Missing : in cell B37 - Missing : in cell D37 What I would like to return is the following…
user925738
  • 45
  • 7
1 2 3
99
100