Can you use WithMappedCells and still get rows of data? #3336
-
I have a spreadsheet where the first few rows have some general information like order date, order number, etc. Below that is the header row, then data for those headings in rows below that. Each AddOnOrder instance has fields for the general info and data from one of the rows. Here's an example of the table.
Here's the code I expected to work.
If I dd($row) at the beginning of the model function, it is an array with ONLY the mapped cells. If I remove the heading row functionality, and just use row indexes ( Is it possible to gather rows of data when you have other data in specific cells in the same spreadsheet? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
No that's not possible. MappedCells is meant to map only cells, not columns. You might want two imports or use a BeforeSheet event to save that information before executing the row import. |
Beta Was this translation helpful? Give feedback.
No that's not possible. MappedCells is meant to map only cells, not columns. You might want two imports or use a BeforeSheet event to save that information before executing the row import.