Skip to content

Commit 3a6ba3c

Browse files
author
Gianluca Giovinazzo
committed
Fix for reading Namespaces only usend in root node
1 parent b16e26c commit 3a6ba3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PhpSpreadsheet/Reader/Xml.php

+2
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet)
324324
$xml = $this->trySimpleXMLLoadString($pFilename);
325325

326326
$namespaces = $xml->getNamespaces(true);
327+
$namespacesDoc = $xml->getDocNamespaces(true);
328+
$namespaces = array_merge($namespaces, $namespacesDoc);
327329

328330
$docProps = $spreadsheet->getProperties();
329331
if (isset($xml->DocumentProperties[0])) {

0 commit comments

Comments
 (0)