PhpSpreadsheet/samples/Basic
oleibman 5174a4ab15
Special Characters in Image File Name (#2416)
* Special Characters in Image File Name

Fix #2415. Fix #1470. If path name of image contains anything other than ASCII, or if it contains # or space or probably other exceptions, PhpSpreadsheet creates a file that Excel cannot, for whatever reason, read (it is valid xml). When adding an image to a spreadsheet, Excel does not retain the original path name; PhpSpreadsheet does, but probably shouldn't. It is changed to save the image file in the zip as the MD5 hash of the original path name. This produces a file that Excel can read. In addition, it ensures that, if the image is used in multiple places, it is saved in the Excel file only once.

Because this error becomes evident only when opening the file in Excel, it is difficult to write a test case. I have instead duplicated sample Basic/05... using image files whose names match the reported error conditions.

* Scrutinizer Minor Error

Remove some newly dead code.
2021-12-06 06:50:09 -08:00
..
data/continents Merge all examples together 2017-10-01 17:48:59 +09:00
01_Simple.php Document Properties - Coverage and 32-bit-safe Timestamps (#2113) 2021-05-30 13:55:58 +02:00
01_Simple_download_ods.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
01_Simple_download_pdf.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
01_Simple_download_xls.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
01_Simple_download_xlsx.php Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
02_Types.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
03_Formulas.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
04_Printing.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
05_Feature_demo.php Merge all examples together 2017-10-01 17:48:59 +09:00
05_UnexpectedCharacters.php Special Characters in Image File Name (#2416) 2021-12-06 06:50:09 -08:00
06_Largescale.php Merge all examples together 2017-10-01 17:48:59 +09:00
07_Reader.php Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
08_Conditional_formatting.php Upgrade to latest PHP_CodeSniffer 2018-08-06 11:02:16 +09:00
08_Conditional_formatting_2.php Upgrade to latest PHP_CodeSniffer 2018-08-06 11:02:16 +09:00
09_Pagebreaks.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
11_Documentsecurity.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
12_CellProtection.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
13_Calculation.php PSR12 code style 2020-07-26 14:13:11 +09:00
13_CalculationCyclicFormulae.php PSR12 code style 2020-07-26 14:13:11 +09:00
14_Xls.php Merge all examples together 2017-10-01 17:48:59 +09:00
15_Datavalidation.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
16_Csv.php Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
17_Html.php Merge all examples together 2017-10-01 17:48:59 +09:00
17a_Html.php Improve HTML Writer (#1464) 2020-05-18 12:43:18 +09:00
17b_Html.php Different Example for Callback 2020-06-09 00:22:22 -07:00
18_Extendedcalculation.php Rename classes to keep them in their related namespaces 2017-10-29 17:39:42 +09:00
19_Namedrange.php Two Problems with Sample19 2021-05-09 15:41:36 -07:00
20_Read_Excel2003XML.php Improving Coverage for Excel2003 XML Reader (#1557) 2020-10-11 13:26:56 +02:00
20_Read_Gnumeric.php Merge all examples together 2017-10-01 17:48:59 +09:00
20_Read_Ods.php Merge all examples together 2017-10-01 17:48:59 +09:00
20_Read_Sylk.php Merge all examples together 2017-10-01 17:48:59 +09:00
20_Read_Xls.php Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
22_Heavily_formatted.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
23_Sharedstyles.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
24_Readfilter.php Work on renaming method arguments for the Readers and Writers 2020-11-19 16:41:52 +01:00
25_In_memory_image.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
26_Utf8.php Remove tests that include tcPDF and DomPDF libraries when running against PHP8, because neither library is yet PHP8-ready 2020-10-09 14:31:16 +02:00
27_Images_Xls.php Merge all examples together 2017-10-01 17:48:59 +09:00
28_Iterator.php Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
29_Advanced_value_binder.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
30_Template.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
30_Templatebiff5.php Stacked Alignment - Use Class Constant Rather than Literal (#1716) 2021-02-03 23:53:04 +01:00
31_Document_properties_write.php Minor improvements (#1028) 2019-06-22 21:24:51 +02:00
31_Document_properties_write_xls.php Minor improvements (#1028) 2019-06-22 21:24:51 +02:00
37_Page_layout_view.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
38_Clone_worksheet.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
39_Dropdown.php Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
40_Duplicate_style.php Additional conditionals from math trig (#1885) 2021-02-28 10:24:33 +01:00
41_Password.php Merge all examples together 2017-10-01 17:48:59 +09:00
42_RichText.php Improve Coverage for HTML Reader 2020-06-25 22:42:38 -07:00
43_Merge_workbooks.php Initial Formula Translation tests (#1886) 2021-02-28 13:18:51 +01:00
44_Worksheet_info.php Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
45_Quadratic_equation_solver.php Changes to the default arguments for `htmlspecialchars()` and `html_entity_decode()` requires setting of the argument value explicitly to prevent changes in behaviour. (#2176) 2021-06-21 12:56:03 +02:00
46_ReadHtml.php Merge all examples together 2017-10-01 17:48:59 +09:00