Skip to content

Error "Invalid cell coordinate A-1" reading HTML file #2029

Closed
@danmodini

Description

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?

Open flawessly the html file

What is the current behavior?

Gives an error "Invalid cell coordinate A-1"

What are the steps to reproduce?

<?php

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

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

$objPHPExcel = PhpSpreadsheet\IOFactory::load('Nomina_30539141909_202102_000.xls'); // it is a html file

### Which versions of PhpSpreadsheet and PHP are affected?
1.17.1
[Nomina_30539141909_202102_000.xls](https://github.com/PHPOffice/PhpSpreadsheet/files/6386224/Nomina_30539141909_202102_000.xls)

I find a personal solution limiting the value of $row to 1 in line 473:

           if ($this->tableLevel > 1 && $row>1) {
                --$row;
            }
this is because the hyphen in the error is a minus sign. I dont know if this workaround breakes something else...
Thank you at advance

Daniel

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