Replies: 1 comment 6 replies
-
That would be a pretty big breaking change, so I would have to hold of on that. You can implement a custom heading row formatter https://docs.laravel-excel.com/3.1/imports/heading-row.html#heading-key-formatting and use to key to make a difference between the columns that have the same heading name. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am contemplating modifying line 85 of src/Row.php to:
$array_counts = array_count_values($this->headingRow); if($array_counts[$this->headingRow[$i]] > 1){ $cells[$this->headingRow[$i]][] = $value; } else { $cells[$this->headingRow[$i]] = $value; }
to allow for multiples of a column header to indicate the the values should be stored as an array.
Wanted to check to see if this makes sense, or if this feature already is supported and I overlooked it.
I figured for my clients it would be easiest to format arrays in their sheets this way instead of enforcing json syntax in an individual cell. Please let me know your thoughts. Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions