Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP create and format a Microsoft Word document

Tags:

php

ms-word

I was looking to use PHP to create a Microsoft Word document. After looking online I found that most of the offered solutions were to just create an .doc that had not formatting done whatsoever. I was wondering what would be the best way to create a Word document that I could format in PHP i.e. change font, color, size, etc. for my company. I am guessing that some sort of library would be needed for this. Any responses would be greatly appreciated.

like image 749
Tyler Hilbert Avatar asked Jul 08 '13 16:07

Tyler Hilbert


1 Answers

You can use PHPWord. It's a PHP library that can create DOCX along with some formatting.

like image 117
ivanlanin Avatar answered Oct 30 '22 15:10

ivanlanin