Laravel-excel: The same column name / column header

Created on 2 Apr 2017  路  2Comments  路  Source: Maatwebsite/Laravel-Excel

I have the sample file.

| columnOne | columnTwo | columnTwo |
| data1 | data2 | data3 |
| data4 | data5 | data6 |

The issue is when having 2 the same column names. Im just thinking maybe the user didn't notice it. When I try to display the column headers, its like array duplicate key is not allowed. Thanks

Most helpful comment

Use heading slugged_with_count or numeric, then you are certain nothing gets merged.

https://github.com/Maatwebsite/Laravel-Excel/blob/2.1/src/config/excel.php#L374

All 2 comments

Why don't you use column merge if both column name is same. Programmatically and local script is behaving perfectly. You need to use right feature to achieve as you required..

Use heading slugged_with_count or numeric, then you are certain nothing gets merged.

https://github.com/Maatwebsite/Laravel-Excel/blob/2.1/src/config/excel.php#L374

Was this page helpful?
0 / 5 - 0 ratings