PHPOffice is an open-source collection of libraries used for reading and writing files in formats compatible with various "office" suites, such as Microsoft Office and OpenOffice.
Questions tagged [phpoffice]
242 questions
0
votes
0 answers
PHPOffice/PHPPresentation (PowerPoint) Chart: both outline setWidth and gridline setWidth methods are not working
By following the documentation I try to change width of Y axis gridlines and outline.
First I create series:
$series = new Chart\Series($label,…

Vlado
- 3,517
- 2
- 26
- 24
0
votes
1 answer
Imported excel null date inputted as 1970-01-01
I'm using phpoffice/phpspreadsheet as the packages. When im testing the function of importing excel into database. I noticed all the null dates are now 1970-01-01. How do I fix it?
Following is the sample…

seph roth
- 25
- 6
0
votes
0 answers
Getting html tags to show up in word
I'm using laravel and I have a summernote as my textarea.
The issue I'm having is that, if I add some styling to my text in summernote for example I have a bold text.
So in my database I have
Bold Text
and when I call it in for my word…
Nikki
- 3
- 3
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
0 answers
PHPOffice/PHPPresentation (PowerPoint) - how to prevent paragraph text from wrapping to a new line when in a table cell? Is there a dedicated method?
Inside a table cell I have a text - a number in fact but with space thousands separators like:
123 456 789
This data is dynamic and the value can vary a lot. I need a method to prevent this number from wrapping to a new line inside cell like:
123…

Vlado
- 3,517
- 2
- 26
- 24
0
votes
1 answer
PHPOffice/PHPPresentation (PowerPoint): how to use setDisplayBlankAs() Chart method?
I tried to use setDisplayBlankAs() method as shown in documentation at:
https://phpoffice.github.io/PHPPresentation/usage/shapes/chart.html#customization
but I got an error:
PhpOffice\PhpPresentation\Shape\Chart\Type\Line::setDisplayBlankAs()…

Vlado
- 3,517
- 2
- 26
- 24
0
votes
1 answer
How can I use phpoffice to extract a specific worksheet from an .xlsx file and create a new .xlsx from it?
I have one .xlsx file containing several worksheets. This .xlsx is generated using the php library phpoffice / phpspreadsheet. What I need to do is extract a specific worksheet from this file and create a new one - a separate .xlsx file.
My PHP code…

Petr Fořt Fru-Fru
- 858
- 2
- 8
- 23
0
votes
1 answer
Installation error on PHPOffice PHPSpreadSheet with Composer
I am using Windows 10 with Laragon 5.0 WAMP (PHP 7.4.19 & Apache 2.4.47).
Trying install PHPOffice/PHPSpreadSheet with Composer using this command:
composer require phpoffice/phpspreadsheet
Nothing wrong with Composer installation, but when trying…

wieb
- 113
- 1
- 2
- 11
0
votes
1 answer
phpword setValue string replacement not working
I have a PHP application that is meant to merge user data with a DOCX word document, I am using phpoffice/phpword library for this task. The issue is that some variables are irregularly replaced while most of the variables are simply not replaced at…

Armitage2k
- 1,164
- 2
- 27
- 59
0
votes
1 answer
phpspreadsheet The problem that the shape and image of a specific sheet disappear when saving a file
load($origin_file);
$writer = new…

jongba
- 1
- 1
0
votes
0 answers
Is there a way to solve this problem in phpoffice?
Argument 1 passed to PhpOffice\Common\Drawing::pixelsToEmu() must be of the type float, null given, C:\xampp\htdocs\vendor\phpoffice\phppresentation\src\PhpPresentation\Writer\PowerPoint2007\Abstra...
class GeneratePPT extends Controller{ …
0
votes
0 answers
How to sum value of column form row Excel with PHP office
I have an Excel file that I want to upload it with Phpoffice, and preview on web application
everything works fine and success with this code:
if(isset($_POST['submit'])){
$err ="";
$ekstensi="";
$success="";
…

Muhammad Agus
- 1
- 1
0
votes
1 answer
PhpWord 0.18 not saving and code throws an internal sever error
I am trying to create a Word doc in php (7.4) and am using PhpWord 0.18.2. All goes fine right up until I save the document. The system throws an HTTP 500 (Internal sever error). I have searched for this but could not find anything on it. …

dneimeier
- 89
- 2
- 12
0
votes
0 answers
How Can Display a microsoft word document, spreedsheet document using php
am working on an inhouse document management system with Core PHP and postresql but i am trying to display an MS word Document and spreedsheet document using Core PHP but seem to fail, i have seen google docs viewer but it works online we dont…

ERIC HANSEN
- 13
- 4
0
votes
0 answers
Generate PDF from .docx file. ERROR Cannot add Title in Header -PHPOffice
Im trying to convert a word file using PHPWORD library in PHP Laravel. Actually everything is fine with all of the files. BUt there are few files making such issues. I debugged it and dont know.
Here is a piece of code that im using
`$domPdfPath =…

Qaisar Mughal
- 43
- 1
- 6