Questions tagged [phpoffice-phpspreadsheet]
70 questions
0
votes
0 answers
How to set range of separate cells in DataSeriesValues PhpSpreadsheet
I can't make barchart with PhpSpreadsheet. I need to add to DataSeriesValues range of separate cells
This works fine
$xAxisTickValues = [
new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$A$1:$G$1', null, 4),
];
But i…

Jorge O
- 1
- 1
0
votes
0 answers
Convert excel with varying col/rowspans to HTML table in Codeigniter 4 using phpspreadsheet
As you can see from the image that there multiple rows and columns that are merged in here. I need help to convert these merged cells to be shown in a HTML table as it is using php loops.
I have tried multiple libraries but was not able to succeed.…
0
votes
0 answers
Excel is not exporting using php office in Laravel
I am using PHPOffice for exporting excel in laravel it work fine on localhost but it gives me internal server error on live server error?
public function export(Request $request){
$branchId = $this->decryption($request->branch_id);
$data =…

Ahmad Bajwa
- 1
- 2
0
votes
1 answer
It's possible to access $sheet in Import class of laravel-excel or get cell style from PHPOffice/PhpSpreadsheet
Imagine we are importing a excel, and using toCollection method.
And we need fill color of row or cell we using.
I can't figure how to access $sheet to get fill color or other properties of cell.
Anyway, i tried to use beforeImport event to access…

Mahdi
- 923
- 1
- 6
- 17
0
votes
0 answers
PHPOffice: PHP Fatal error: Interface 'Psr\SimpleCache\CacheInterface' not found
I have custom WordPress plugin where I giving option for admins to download export of survey. The plugin using package phpoffice
I have test hosting with PHP 7.3 where export goes well and the production hosting is on PHP 7.3.3 (before it was PHP…

MartyQek
- 1
- 1
0
votes
0 answers
Excel file created from box/spout library is not editable in microsoft excel
I just recently implemented box/spout library replacing the phpspreadsheet library in favour of memory efficiency.
I am also able to produce the excel file using it.
But after opening the excel file using ms office 2019, I cannot edit the cells at…

FerdousTheWebCoder
- 218
- 3
- 13
0
votes
0 answers
Deleting rows with PhpSpreadsheet
I am struggling to find a way to totally remove empty rows from a financial spreadsheet that is created from db results (loop);
I need to remove / delete rows with a calculated row total that equals 0, I first tried hiding rows that have a zero…
0
votes
0 answers
Excel formular value changes to #VALUE! when reading with PHP
I read an Excel file with PhpOffice\PhpSpreadsheet
I Excel I have some values that are calculated and the field shows the right value.
When reading the XLSX file is been read with PhpOffice\PhpSpreadsheet the value changes to #VALUE! as if there was…

Jeppe Donslund
- 469
- 9
- 25
0
votes
1 answer
Php spreadsheet downlod is giving garbage collect error
I am using "phpoffice/phpspreadsheet": "^1.25", for downloading Excel file.
Here is the code I have used.
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use…

nas
- 2,289
- 5
- 32
- 67
0
votes
0 answers
Convert First Row of .xlsx to Header Row with PhpSpreadsheet
How can I configure the first row of my Excel document as a header row?
I can only find ways to customize the style of the cells in the first row. For this I made myself a little helper method, but there must be a flag I can set, right?
What I'm…

floriankapaun
- 472
- 1
- 4
- 19
0
votes
1 answer
How to ignore first row (header row) on insert using PhpOffice\PhpSpreadsheet
I am looking for a way to ignore first row which is the header row when inserting data into mysql database using PhpOffice\PhpSpreadsheet.I have followed this but not workingSkip First Row in PHPSpreadsheet ImportMy problem is how to ignore the…

Bashir Hassan
- 33
- 5
0
votes
0 answers
phpoffice spreadsheet formula not working when inserting new row in laravel
I am using this library for creating excel files. https://phpspreadsheet.readthedocs.io/
Run cost column should sum all values at the end. The problem is when I add new row after downloading formula doesn't work on a new row.
Here is my…

web pakistan
- 444
- 1
- 4
- 16
0
votes
1 answer
Number stored as text - PHPSpreadsheet
I'm exporting data from a MySQL DB to Excel using PHPSpreadsheet. The spreadsheet is working fine, the data is exporting correctly, however, the numbers are being stored as text. I can get PHPSpreadsheet to convert the cell to a number, but the…

Rayza
- 123
- 1
- 10
0
votes
0 answers
PhpSpreadsheet: How can I set cell text orientation?
I'm finding a way to set the text orientation while using PhpSpreadsheet.
Like this https://i.stack.imgur.com/SvQnz.png
But the only thing I found is setTextRotation.
When I use this method. The result will be https://i.stack.imgur.com/jFUyH.png
How…
0
votes
0 answers
PHPSpreadSheet is showing HTML page content
I wrote a class to wrap around the PhpSpreadSheet so that all I would need to do is pass it an array. Then it would generate the proper spreadsheet. Life was fine in testing. In production, the file generated only has HTML in it.
Yes, I am calling…

user1794918
- 1,131
- 2
- 16
- 34