How to skip sheets with only a header row. #3414
Unanswered
Amay-Singh
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Im performing import in Laravel, using Maatwebsites laravel-excel. When I import an excel file with one sheet having only a head and no content I get an exception:
Start row (2) is beyond highest row (1)
After which the remaining sheets in the file do not get imported and the entire code crashes. I have handled the situation currently by checking the number of rows and displaying the exception in a field but am trying to figure out how to skip the sheet completely if the number of rows in the given sheet is less than 2 (1 -header, 2- at least one row).
Beta Was this translation helpful? Give feedback.
All reactions