PhpSpreadsheet
PhpSpreadsheet copied to clipboard
Error in part of the content in the book...
What is the expected behavior?
Numeric data cells are missing extra characters
What is the current behavior?
Why for numeric values in cells, the first character before this number, is added a single quote. This leads to an error in Microsoft Excel. I added a condition that if the value = is_numeric, then we set DataType::TYPE_NUMERIC for setValueExplicit. But there are numbers in the form of a date 04.09.2024 or such as 47.91.2 and this did not work with them ... How to solve the problem with them if TYPE_NUMERIC for them leads to a Fatal error ?
What are the steps to reproduce?
->setValueExplicit('04.09.2024', DataType::TYPE_STRING);
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
->setValueExplicit('04.09.2024', DataType::TYPE_STRING);
If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.
What features do you think are causing the issue
- [ ] Writer
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
Xlsx
Which versions of PhpSpreadsheet and PHP are affected?
<=1.28