Questions tagged [phpoffice-phpspreadsheet]
70 questions
1
vote
0 answers
Update excel values depend on another values PHPOfficeSpreadsheet
I would like to update the cell value from excel file dynamically using phpofficespreadsheet library. The scenario is, get the mysql query as follow:
while($row = $query->fetch_assoc()) {
$datas = array(
'id' => $row['IdNumber']
…

da_root
- 364
- 2
- 11
1
vote
2 answers
PHPSpreadsheet doesn't work with PHP version 7.3.26
I have tested this on 7.2 and it's working. When I move this code to 7.3 it's not working. I installed PHPSpreadsheet without using composer

Vimukthi Saranga
- 69
- 1
- 13
1
vote
1 answer
"phpspreadsheet" Root composer.json requires PHP extension ext-gd * but it is missing
I'm running a Laravel Application and added Laravel Excel, which requires phpoffice/phpspreadsheet.
Since both dependencies are added to my composer.json...,
"maatwebsite/excel": "^3.1",
"phpoffice/phpspreadsheet": "^1.18",
I run into the following…

lordisp
- 634
- 9
- 21
1
vote
1 answer
PHPSpreadsheet autopopulating 0's in empty cells and the formulas are saved as string values
I have to paste the value of variable $val in cell 'B3' in Sheet 0.
After this, I have to export sheet1 as pdf.
But I can see that when I am converting sheet1 as pdf, the formulas are not printed 'as values' but they are printed as a…

NIKHIL NAIR
- 21
- 5
1
vote
0 answers
How do I Protect an entire column BASED on the selected excel drop-down value using php in a excel file?
The downloadable excel file will contain a dropdown menu. Selecting the dropdown menu will cause certain cells/columns to be protected. The excel file will have the embed code to configure the functionality of the dropdown which is to protect…

Ramo
- 11
- 1
1
vote
1 answer
Hide Columns with PhpSpreadsheet
I am trying to hide some specific columns on a local Excel Sheet, but it does not hide, the code I am using is:
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
$spreadsheet…

Hygison Brandao
- 590
- 1
- 4
- 16
1
vote
0 answers
Phpspreadsheet ods problem with merge cells
Using phpSpreadsheet 1.16 to generate xls and ods files. Xls files runs correct but ods stuck on merge cells - no error simply forever loading. What can i do to solve…

Дмитрий
- 131
- 7
1
vote
1 answer
How to use PHP spreadsheet in drupal 7 for reading excel file and storing in database
I'm new in Drupal 7, I want to use PHP Spreadsheet in my project, but how much i know that PHP spreadheet module is available in Drupal 8, and for Drupal 7 we need to use it's library, so I followed this steps for PHP spreadsheet
Download the…

beginner_coder
- 68
- 5
1
vote
1 answer
Why cannot read csv file by PhpOffice\PhpSpreadsheet?
I'm using PhpOffice\PhpSpreadsheet to read a csv file like :
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile($file);
$reader->setReadDataOnly(true);
$spreadsheet = $reader->load($file);
It error: Warning: mime_content_type(): Can…

Tien Nguyen Nhut
- 5
- 5
0
votes
1 answer
syntax error, unexpected identifier "Closure", expecting variable in /PhpSpreadsheet/vendor/maennchen/zipstream-php/src/ZipStream.php on line 111
The following PhpSpreadsheet code is working properly on localhost but not on live server.
THE ISSUE IS : save('php://output'); is not downloading the xlsx file.
PhpSpreadsheet Version : 1.29.0
PHP version is:
localhost : 8.1.6
live server :…

rickoonidioser
- 3
- 5
0
votes
0 answers
PhpSpreadsheet\IOFactory making excel pivot inactive
I'm trying to write on some sheet in Excel file that contains some sheets with pivots, the problem is when the file is downloaded to the user all pivots are getting inactive (become text).
is there another library in PHP / Laravel that can help me…
0
votes
0 answers
How to show transparent png in PhpOffice Spreadsheet?
I use standard code for inserting images from s3 bucket to spreadsheet
$stamp = MemoryDrawing::fromString($stamp_file);
$stamp->setName('Stamp');
$stamp->setHeight(120);
$stamp->setCoordinates('A2');
$stamp->setWorksheet($sheet);
All the examples I…

ArtyGrand
- 93
- 10
0
votes
1 answer
PHPSpreadsheet add borders to ODS file
I'm trying to add borders to my ODS file but it doesn't seem to work.
Tried to save the file with the Xlsx writer and it works perfectly.
Here's the code :
$spreadsheet = new Spreadsheet();
$activeWorksheet =…

kcp
- 1
0
votes
1 answer
how to install phpmailer with phpspreadsheet installed local server
i have installed PHP-spreadsheet library to save data in MySQL database to excel file. now i wanted to send emails from my site using PHP-mailer. when i try to install PHP-mailer package using composer following error massage
then i try to download…

Manojs
- 11
- 3
0
votes
0 answers
Charts not exporting on PDF using maatwebsite/excel for Laravel
Using the package maatwebsite/excel for Laravel I'm trying to export to PDF an XLSX that has a chart in it.
I can see the chart if I export as an xlsx file, but when exporting to PDF is not showing the chart.
I have tried with all the PDF…

JohnnyAce
- 3,569
- 9
- 37
- 59