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
1
vote
1 answer
PhpStorm Warnings on incorrect objects (Laravel)
I have been cleaning up some PhpStorm warnings using PHPDoc and in some cases there are objects referenced incorrectly. Here's an example:
$Title = $currentSlide->createRichTextShape();
CreateRichTextShape() returns as RichText as seen here:
/**
…

Programmer
- 144
- 1
- 10
1
vote
0 answers
Docx to pdf convertion in PHP adding new lines automatically - PHPWord
I am converting docx file to pdf using PHP library PHPOffice and PHPWord. I am using TCPDF as PDF writer.
My code is as below
include_once 'Sample_Header.php';
include_once…

Lalmani Dewangan
- 306
- 2
- 11
1
vote
2 answers
PHPExcel : How to create new worksheet with template?
Currently using template excel sheet to add data, the requirement is add new sheet too, so need to add new sheet with same template.
My starts with new tamplate :
$filePath = public_path('Template.xls');
$objPHPExcel =…

151291
- 3,308
- 7
- 48
- 81
1
vote
1 answer
How to set range of separate cells in DataSeriesValues PHPExcel RadarChart
I can't make radar chart with PHPExcel. I need to add to DataSeriesValues range of separate cells
$xAxisTickValues = [
new \PHPExcel_Chart_DataSeriesValues('String', $sn.'!$B$5', NULL, 1),
new…

Роман Ямчук
- 11
- 2
1
vote
1 answer
PHPWord 0.11.0 font style underline
I have a problem with PHPWord that I belive is version 0.11.0, I use the PHPWord for CI.
The issues is I cannot find the right php script to make the underline, this is the latest script I got,
$section->addText(
$text,
[ 'underline' =>…
user7857373
1
vote
1 answer
PHPExcel Insert in each row from Array
Is it possible to write into an excelsheet from A1 to Ax (vertically) with the fromArray function?
$objPHPExcel->getActiveSheet()->fromArray($array, NULL, 'A1');
What this line above does, is write from A1 to X1 (horizontal).
But is there anyway so…
user7807017
1
vote
2 answers
Stable version of PhpSpreadsheet (PhpExcel)
I tried to use PhpSpreadsheet. In Issues section I found that the master branch is now broken.
I tried to use the develop branch, but I can't find a fully functional and ready to copy\paste version. There are no Autoloader.php and etc. like in the…

autumnrustle
- 595
- 1
- 10
- 21
1
vote
2 answers
read all sheets in xls and xlsx file using PHPExcel
hi im working on a project that displays the content of an excel file using php so far here is the code im working on
$inputFileType = 'Excel5'; // Excel2007 for xlsx
$inputFileName = $opendoc;
$objReader =…

BourneShady
- 955
- 2
- 17
- 36
1
vote
1 answer
Vertical slide with PHPOffice
I'm using PHPOffice to generate a presentation based on DB data. It's a great library. Does anyone know how to set a presentation to vertical? On the features it says it does support it, but I can't seem to find a way to do it. Any guidance will be…

Bernardo Pineda
- 21
- 3
1
vote
0 answers
Reading *.docx with PHPWord
I'm using Laravel for my school project and recently found the PHPOffice library. I found some examples in the documentation but I still can't understand how to cope it with Laravel. Installed it with composer and now I want to read some *.docx…

Alex
- 485
- 6
- 18
1
vote
1 answer
Escape '&' when filling in a docx document using PHPWord
I am building a web application which has to fill in a docx document. I am using the TemplateProcessor provided by PHPWord which takes a specific hook presenting on the document and replaces it with a given string. The problem that I have is when in…

Радослав Ангелов
- 279
- 1
- 4
- 13
0
votes
0 answers
How to convert, or read a .doc file with PHPWord?
I've crawled this and other websites and found no solutions to this: I'm trying to read the text from a .doc file using PHPOffice/PHPWord and all the code I've tried has failed. I can read .docx files just fine, it's just 97-03 Word documents that…

Grimcall
- 1
0
votes
0 answers
PHPword Fatal error: Uncaught Error: Call to a member function write() on null in phpoffice\PhpWord\Writer\Word2007.php on line 137
my phpword is not working and showing the following error
Fatal error: Uncaught Error: Call to a member function write() on null in phpoffice\PhpWord\Writer\Word2007.php:137 Stack trace: #0 test.php(45):…
0
votes
0 answers
What are the 3 parameters of setAutoFit
I'm using PhpOffice\PhpPresentation to create a PowerPoint with PHP... so far so good.
I'have created a shape and a textRun. The length of the text may vary and I try to understand how setAutoFit works. Using RichText::AUTOFIT_NORMAL as 1st…

Cedric Cholley
- 1,956
- 2
- 9
- 15
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