Skip to content

Spreadsheet getNamedRange returns null (1.5.0) #739

Closed
@shashane

Description

This is:

- [X] 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?

Retriveing named ranges from xlsx file.

What is the current behavior?

namedRanges array in Spreadsheet object is empty

Works fine in 1.4.1.
Breaking change on 1.5.0.

What are the steps to reproduce?

<?php

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

// Create new Spreadsheet object

$spreadsheet = IOFactory::load('My File.xlsx');
$range = $spreadsheet->getNamedRange('Range Name');
// 'My File.xlsx' contains a named range 'Range Name'
// $range is null
 

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet v1.5
Php 5.6.33

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