PHPackages                             parkejunior/spreadsheetmr - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. parkejunior/spreadsheetmr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

parkejunior/spreadsheetmr
=========================

Multiformat spreadsheet reader

0.1.0(5y ago)017MITPHP

Since Jan 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/parkejunior/spreadsheetmr)[ Packagist](https://packagist.org/packages/parkejunior/spreadsheetmr)[ RSS](/packages/parkejunior-spreadsheetmr/feed)WikiDiscussions master Synced today

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

SpreadSheetMR
=============

[](#spreadsheetmr)

SpreadSheetMR is a simple multiformat spreadsheet reader.

- Read XLSX, XLS, CSV or TXT files
- Combine header with data
- Ignore row or columns

This library uses [`shuchkin/SimpleXLS`](https://github.com/shuchkin/simplexls) and [`shuchkin/SimpleXLSX`](https://github.com/shuchkin/simplexlsx) for read Excel files.

Installation
============

[](#installation)

First, you will need to install [Composer](http://getcomposer.org/). Then, run the following command:

```
$ composer install parkejunior/spreadsheetmr
```

Usage
=====

[](#usage)

Basic
-----

[](#basic)

Here is a basic example of using the library:

```
use SpreadSheetMR\SpreadSheetMR;

$path_to_file = "file.csv";
$file_extension = ".csv"; // or only "csv"
$import = new SpreadSheetMR($path_to_file, $file_extension);
$data = $import->getObject();

var_dump($data);
```

The `getObject` method get data formatted using `stdClass`. Note that the file extension is passed as a separate property from the file path, because the path can be temporary like the superglobal `$_FILES['file']['tmp_name']`.

Verify header and limits
------------------------

[](#verify-header-and-limits)

You can use the `verifyFile()` method by passing an array with some settings. Example:

```
...

$import->verifyFile(array(
	"first_title" => "name", // check if first title on header is "name"
	"last_title" => "phone", // check if last title on header is "phone"
	"total_columns" => 4  // check if total columns on header is 4
));
$data = $import->getObject();

var_dump($data);
```

Ignore row and columns
----------------------

[](#ignore-row-and-columns)

It is also possible to ignore columns or rows using the `ignoreRow()` and `ignoreColumn()` methods by passing the index offset as a parameter. Example:

```
...

$import->ignoreRow(3); // ignore 4th row
$import->ignoreColumn(0); // ignore first column
$data = $import->getObject();

var_dump($data);
```

Define which row is the header
------------------------------

[](#define-which-row-is-the-header)

You can define which line is the header by passing to the `headerIndex` property the index offset of the line. Note that when the header is defined, the `getObject ()` method returns a `stdClass` combining the header as an association to the data of each line. Example:

```
...

$import->headerIndex = 0; // define first row as header
$data = $import->getObject();

var_dump($data);
```

Contribution
============

[](#contribution)

If you find any incorrect English grammar or any suggestions on how to improve the library, I appreciate it.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

1997d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f7545f24096ee915043dcf3401d12d06c618cc1ee5dcd2e01d6d22fe1360320?d=identicon)[parkejunior](/maintainers/parkejunior)

---

Top Contributors

[![parkejunior](https://avatars.githubusercontent.com/u/51892490?v=4)](https://github.com/parkejunior "parkejunior (3 commits)")

---

Tags

composer-libraryphp

### Embed Badge

![Health badge](/badges/parkejunior-spreadsheetmr/health.svg)

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

###  Alternatives

[egeloen/ckeditor-bundle

Provides a CKEditor integration for your Symfony2 Project.

3375.1M45](/packages/egeloen-ckeditor-bundle)[marvinosswald/filament-input-select-affix

this input enables you to render a select next to an input in a seamless fashion

26136.1k1](/packages/marvinosswald-filament-input-select-affix)

PHPackages © 2026

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