Skip to content

Instantly share code, notes, and snippets.

View cagp-dev-mtl's full-sized avatar

Carlos Gutiérrez cagp-dev-mtl

View GitHub Profile
@AndrewChamp
AndrewChamp / docx_editor.php
Created July 27, 2015 15:05
Edit a Microsoft Word .docx file using PHP and the zip extension.
<?php
/**
* Edit a Word 2007 and newer .docx file.
* Utilizes the zip extension http://php.net/manual/en/book.zip.php
* to access the document.xml file that holds the markup language for
* contents and formatting of a Word document.
*
* In this example we're replacing some token strings. Using
* the Office Open XML standard ( https://en.wikipedia.org/wiki/Office_Open_XML )
* you can add, modify, or remove content or structure of the document.