Skip to content

Notice of undefined index when opening file #1392

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

Closed
tristanleboss opened this issue Feb 23, 2020 · 12 comments
Closed

Notice of undefined index when opening file #1392

tristanleboss opened this issue Feb 23, 2020 · 12 comments

Comments

@tristanleboss
Copy link

tristanleboss commented Feb 23, 2020

This is:

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

What is the expected behavior?

No notice. Even if chart sheet are not supported, there should be no notice. Index should be checked using array_key_exists or isset before access.

What is the current behavior?

I get a notice:

Notice: Undefined index: rId14 in C:\Users\Downloads\simujp\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php on line 624

Call Stack:
0.0013 529064 1. {main}() C:\Users\Downloads\simujp\test.php:0
0.0345 1606576 2. PhpOffice\PhpSpreadsheet\Reader\Xlsx->load() C:\Users\Downloads\simujp\test.php:12

What are the steps to reproduce?

I cant' provide the file but searching in it for rId14 using WinRAR gives 2 results:

image

xl/workbook.xml:
<sheet name="7 Evolution fiscale " sheetId="35" r:id="rId14"/>

xl/_rels/workbook.xml.rels
<Relationship Id="rId14" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet" Target="chartsheets/sheet1.xml"/>

File xl\chartsheets\sheet1.xml does exists in the XLSX file.

<?php

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

$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$spreadsheet = $reader->load("BadFile.xlsx");

Which versions of PhpSpreadsheet and PHP are affected?

Last version installed by Composer.

@perkthefox
Copy link

perkthefox commented Mar 5, 2020

Same here, did you solve it?

@stale
Copy link

stale bot commented May 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label May 6, 2020
@tristanleboss
Copy link
Author

Activity ;)

@stale stale bot removed the stale label May 7, 2020
@stale
Copy link

stale bot commented Jul 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Jul 6, 2020
@tristanleboss
Copy link
Author

Activity ;)

@stale stale bot removed the stale label Jul 11, 2020
@stale
Copy link

stale bot commented Sep 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Sep 11, 2020
@tristanleboss
Copy link
Author

This error is due to the fact chart sheet are not supported cf. #1564

@stale stale bot removed the stale label Sep 15, 2020
@tristanleboss tristanleboss reopened this Sep 15, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
@tristanleboss
Copy link
Author

You're an annoying bot ;)

@stale stale bot removed the stale label Dec 25, 2020
@jarrettj
Copy link
Contributor

Hi,

Good day.

This happens if the image source is a link as well.

Regards.
JJ

@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Jun 26, 2021
@oleibman
Copy link
Collaborator

oleibman commented May 7, 2024

Chartsheets are supported since PR #2830 which was merged 2 years ago.

@oleibman oleibman closed this as completed May 7, 2024
@oleibman oleibman removed the stale label Jul 19, 2024
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

4 participants