PhpSpreadsheet/samples/images
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
..
PhpSpreadsheet_logo.png Add missing sample image 2016-11-28 00:53:19 +09:00
bmp.bmp Xls Writer - Correct Timestamp Bug, Improve Coverage (#1493) 2020-06-19 21:08:36 +02:00
gif.gif Xls Writer - Correct Timestamp Bug, Improve Coverage (#1493) 2020-06-19 21:08:36 +02:00
officelogo.jpg Reorganize code samples 2016-09-01 01:17:13 +09:00
paid.png Reorganize code samples 2016-09-01 01:17:13 +09:00
terms con#ditions.jpg Special Characters in Image File Name (#2416) 2021-12-06 06:50:09 -08:00
termsconditions.jpg Reorganize code samples 2016-09-01 01:17:13 +09:00
サンプル.png Special Characters in Image File Name (#2416) 2021-12-06 06:50:09 -08:00