1. Go to this page and download the library: Download dkulyk/openxml-package library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dkulyk / openxml-package example snippets
use DK\OpenXml\OpenXmlPackage;
use DK\OpenXml\Packaging\RelationshipType;
$package = OpenXmlPackage::open('document.docx');
$document = $package
->getRelationships()
->firstByType(RelationshipType::OFFICE_DOCUMENT)
?->getTargetPart();
$xml = $document?->getContents();