Laravel Excel

用來處理 excel 的匯入

https://docs.laravel-excel.com/3.1/getting-started/

基礎

架構概念

https://docs.laravel-excel.com/3.1/architecture/

生命週期

Exports Lifecycle Overview

  • Export Object => 都是從它開始
  • Passing on the Export object => Export object 會 pass 給 Laravel Excel package, 有多種呼叫的方式
    • Facade
    • Dependency injection
    • Contract
    • Exportable trait
  • Handling the Export object
    • Writer type detection
    • Starting the Writing process
    • Multiple sheets => 判斷是否是多個 sheet
    • Processing the sheets => 處理 sheet
  • Passing on to PhpSpreadsheet
  • Creating a Response
    • Download the file
    • Storing the file

Imports Lifecycle Overview

  • Import Object
  • Passing on the Import object
  • Handling the Import object
  • Starting the Reading process
  • Multiple sheets
  • Processing the sheets

Exports 相關 features

https://docs.laravel-excel.com/3.1/exports/

Imports 相關 features

https://docs.laravel-excel.com/3.1/imports/

設定起始 row
https://stackoverflow.com/questions/56726778/how-to-skip-first-row-when-importing-file

tags: 2022 laravel excel laracel-excel