Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danmodini opened this issue Apr 27, 2021 · 0 comments
Closed

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

danmodini opened this issue Apr 27, 2021 · 0 comments

Comments

@danmodini
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants