PHPackages                             cleiton080/spreadsheet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. cleiton080/spreadsheet

ActiveLibrary[File &amp; Storage](/categories/file-storage)

cleiton080/spreadsheet
======================

This is a package to help you to manage your csv files

v1.0-beta(4y ago)021[1 PRs](https://github.com/Cleiton080/importar-csv/pulls)MITPHPCI passing

Since May 15Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Cleiton080/importar-csv)[ Packagist](https://packagist.org/packages/cleiton080/spreadsheet)[ RSS](/packages/cleiton080-spreadsheet/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Importar-csv
============

[](#importar-csv)

👨🏻‍🔧 Install
------------

[](#‍-install)

You can just install using composer as shown bellow

```
composer require cleiton080/spreadsheet

```

Now you're ready to go 🥳🎉!

🚀 Usage
-------

[](#-usage)

With the package properly set up you can use it either to read the csv and save it somewhere else or get a set of data and turn it into a csv file as we will see later on.

### Import

[](#import)

In this example we are going to see, what would it looks like if you have a csv file and wanted to save it into a database.

```
$csv = new \Cleiton080\Csv\Import;

$csv->load(storage_path('product.csv'));

// The callback you passed through the import method will be execute for each row,
// the row parameter represents the row and its position represents the column
$csv->import(function ($row) use ($product) {
    $product->create([
        'id' => $row[0],
        'name' => $row[1],
        'price' => $row[2]
    ]);
});

```

### Export

[](#export)

Let's do the opposite, now we have some records in our database and we want to save it into a csv file.

```
$product = new App\Models\Product;
$csv = new \Cleiton080\Csv\Export;

$products = $product->all();

$csv->exportAt(
    $products->toArray(),
    storage_path('product.csv')
);

```

👨‍🔬 Test
--------

[](#‍-test)

```
composer run-script test

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance53

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1731d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29905846?v=4)[Cleiton Pessoa](/maintainers/Cleiton080)[@Cleiton080](https://github.com/Cleiton080)

---

Top Contributors

[![Cleiton080](https://avatars.githubusercontent.com/u/29905846?v=4)](https://github.com/Cleiton080 "Cleiton080 (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cleiton080-spreadsheet/health.svg)

```
[![Health](https://phpackages.com/badges/cleiton080-spreadsheet/health.svg)](https://phpackages.com/packages/cleiton080-spreadsheet)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
