-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
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?
After setting custom properties, I find them in file's custom properties.
What is the current behavior?
This works for xlsx format, but doesn't for xls.
What are the steps to reproduce?
- set custom properties
- save as xls
- open file in office
- open custom properties dialog
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
<?php
require __DIR__ . '/vendor/autoload.php';
// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$spreadsheet->getProperties()
->setCustomProperty('Exported', time(), \PhpOffice\PhpSpreadsheet\Document\Properties::PROPERTY_TYPE_DATE)
->setCustomProperty('Version', '1.0')
;
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xls($spreadsheet);
$writer->save('spreadsheet.xls');Which versions of PhpSpreadsheet and PHP are affected?
1.8.2