Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Excel Importer Bundle Laravel Package

kczer/excel-importer-bundle

A PHP bundle for importing Excel and CSV spreadsheets into your application. Define how columns map to your data, then read rows into arrays or objects with a simple, configurable API. Handles common spreadsheet formats so you can focus on processing the data rather than parsing files.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the package via Composer and publish any config/provider assets if the package exposes them.
  • Start by reviewing the config for dictionary sheet mappings and model-creation settings. The 5.8 release focuses on two areas: dictionary Excel cell handling and JSON-to-model creation.
  • First practical use case: import a workbook where one sheet acts as a dictionary/lookup source and another sheet creates Eloquent models. For JSON workflows, test creating models from payloads that include “technical” column names such as id, created_at, or other schema-defined fields.
  • No breaking changes are indicated in 5.8. Treat it as a performance and bug-fix release: dictionary Excel cell processing should be faster, and JSON model creation should now handle technical column names correctly.

Implementation Patterns

  • Use dictionary sheets as the source of truth for lookup values, then resolve those values during row import rather than hard-coding IDs or labels in application code.
  • For large imports, pair the 5.8 dictionary performance improvement with chunked reads and queued jobs. The improvement helps cell processing, but does not remove the need to control memory and transaction scope.
  • When creating models from JSON, validate payloads first and then pass them through the package’s model-creation path. Keep $fillable/$guarded aligned with whether technical columns should be assigned or ignored.
  • Integrate imports into service classes or jobs so dictionary loading, model creation, and validation can be tested independently. Wrap model writes in transactions when partial imports are unacceptable.
  • Cache dictionary lookups at the application level if the same dictionary values are reused across many rows. Let the package handle cell parsing; use your own cache for resolved domain values.

Gotchas and Tips

  • The dictionary performance improvement is welcome, but large Excel files can still exhaust memory. Monitor peak usage and prefer chunked or queued processing.
  • The JSON technical-column-name fix may change behavior if you previously depended on those columns being skipped or failing. Add regression tests for payloads containing id, timestamps, and other schema-managed fields.
  • Confirm mass-assignment rules before enabling technical column creation. If id or created_at should remain package/database-controlled, keep them guarded and assert that behavior.
  • Debug dictionary issues by inspecting the raw sheet names, header row, and resolved lookup keys. A small mismatch in sheet naming or header casing often looks like a parsing failure.
  • Use the package’s extension points—custom cell parsers, model resolvers, or dictionary loaders—before forking internals. Keep custom logic thin so future performance and bug-fix releases remain easy to adopt.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle