Philipp Strazny - 2018-07-18 18:12:00
If a file contains the same string in multiple cells, Excel stores just one value in a "shared string" and each cell then just contains a reference to that shared string.
The current code updates string values by (a) retrieving the shared string and (b) changing the value of that shared string.
This produces unwanted results, because changing one cell that shares its string with other cells inadvertently changes the values of the cells that also refer to this shared string.
To fix this, I modified line 210 in the data() function
if (isset($c->v[0]))....
to
if (!$data && isset($c->v[0]))....
If new data is supplied for a given cell, this will create a new shared string for that cell and enter the value into that new shared string. This prevents that other cells are affected.
I'm not sure if this creates orphaned shared strings that should be deleted or if Excel has cleanup functionality to delete shared string that nothing refers to. But it appears to work.