You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [ ] 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?
Show the dropdown from the provided list as per the cell validation.
Set the CellValidation as Number.
What is the current behavior?
We found a problem with some content in ’Bachelor of Science (Hons) (Physics) (44).xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
What are the steps to reproduce?
<?php// Create new Spreadsheet object$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$validation = $spreadsheet->getActiveSheet()->getCell('C3')->getDataValidation();
$validation->setType(\PhpOffice\PhpSpreadsheet\Cell\DataValidation::TYPE_LIST);
$validation->setErrorStyle(\PhpOffice\PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION);
$validation->setAllowBlank(true);
$validation->setShowInputMessage(true);
$validation->setShowErrorMessage(true);
$validation->setShowDropDown(true);
$validation->setErrorTitle('Input error');
$validation->setError('Value is not in list.');
$validation->setPromptTitle('Pick from list');
$validation->setPrompt('Please pick a value from the drop-down list.');
$validation->setFormula1('"Present,Absent,Withheld,UMC"');
Which versions of PhpSpreadsheet and PHP are affected?
1.19.0 and PhP > 7.1
The text was updated successfully, but these errors were encountered:
karmakarpatrick1991
changed the title
setdataValidation results in a corrupted file from version 1.19.0
setDataValidation results in a corrupted file from version 1.19.0
Nov 10, 2021
Closing as a duplicate of #2368. There have been additional PRs since the release of 19.0 which will, I hope, correct your problem. Please test against the most recent PR if possible.
This is:
What is the expected behavior?
What is the current behavior?
We found a problem with some content in ’Bachelor of Science (Hons) (Physics) (44).xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
What are the steps to reproduce?
Which versions of PhpSpreadsheet and PHP are affected?
1.19.0 and PhP > 7.1
The text was updated successfully, but these errors were encountered: