PHPOffice / PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files
https://phpspreadsheet.readthedocs.io
MIT License
13.36k stars 3.47k forks source link

Tables, lists and names get lost in the process #972

Closed seabasss closed 5 years ago

seabasss commented 5 years ago

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?

To load an excel file and the same file comes out with tables, dropdown lists and defined names

What is the current behavior?

PhpSpreadsheet strips tables, dropdown lists and defined names and can't reach ranges from other sheets

What are the steps to reproduce?

require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$spreadsheet = $reader->load("template.xlsx");

header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="result.xlsx"');
header('Cache-Control: max-age=0');

$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx');
$writer->save('php://output');
exit;

You need to load my Excel file and run it through for a complete example, which I can provide if needed. Here are two screenshots of before and after PhpSpreadsheet though:

Screenshot 1 Screenshot 2

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet: v1.6.0 PHP: v7.1.23

Edit // Any news on this?

seabasss commented 5 years ago

Bump. Thank you!

stale[bot] commented 5 years ago

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.

landall commented 5 years ago

Will the feature be supported in the future?

seabasss commented 5 years ago

Wondering too. Thanks!

udacityanna commented 4 years ago

If your company needs to meet accessibility standards, this problem is important.

cbepxpa3ym commented 4 years ago

This issue is still active. Any plans to fix it?

carloslabrador commented 4 years ago

Do you know anything about this?

seabasss commented 3 years ago

Any news on this? Thanks!

nmorell commented 2 years ago

Any chances to re-open this issue?

oleibman commented 2 years ago

Can you upload a file which demonstrates the problem?

oleibman commented 4 months ago

No update in 2.5 years, and tables, list, and names are all supported. Removing stale label, leaving closed.