Skip to content

PhpSpreadsheet content.xml in ODS file must be minified only #804

@akimsullec

Description

@akimsullec

This is:

- [*] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Read ODS files without errors

What is the current behavior?

Fatal error: Uncaught Error: Call to undefined method DOMText::hasAttributeNS() in {{some path prefix}}/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php:467 Stack trace: #0

What are the steps to reproduce?

Some ODS generators as Trassir devices for example, makes ODS format reports with unminified content.xml file in ODS archive.
Just unminify content.xml in any ODS archive and you'll catch the error.

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();

// add code that show the issue here...

Which versions of PhpSpreadsheet and PHP are affected?

php 7.0
phpss - latest

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