2
nitnip
5y

laravel-excel has an absolute piece of shit importer. So rigid I have to jump through loops, use hacks so static functions fill up non-static properties just to do half of what I probably could do much more easily with phpspreadsheet. And to top it off I have no way of getting direct feedback unless it's using the console. What a fucking joke

Comments
  • 0
    You can use external libraries inside laravel too (even non composer ones)
  • 0
    trwtf is PHP
  • 1
    @JoshBent not the real issue. I'm using it because I liked the architecture concept but if I had known how restrictive it was, I would have just used the underlying PhpSpreadsheet package (laravel-excel is just a godawful abstraction)
  • 0
    Sounds like you aren't doing it right. Why are you using static methods for non static properties? Secondly, the sheet classes allow for easy dependency injection.

    I had to read the docs a few times myself to get the hang of it.
  • 0
    @kdion4891 Yes, it allows for DI but I need access to all worksheets at the same time. I can't really inject them since laravel-excel loops through each sheet separately.

    The only times I get access to the entire spreadsheet is in the event functions (beforeImport/beforeSheet/afterImport/afterSheet). These functions must be implemented as static.
Add Comment