Skip to content

phpWord fails to load/read docx files created in office 365. #1253

@vickyaskham

Description

@vickyaskham

This is:

A word document (.docx) created via the desktop will be resolved as a document.xml.

Whereas a word document (.docx) created via office 365 will be resolved as document22.xml.

In function TemplateProcessor::getMainPartName returns the fixed name of word/document.xml which leads to ZipArchive::getFromName failing to get the file xml content.

Instead TemplateProcessor::getMainPartName could potentially use regex to cater 22 in the name incase this changes.

  • PHP version: 5.6 & 7.1
  • PHPWord version: 0.13 & 0.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions