PHPackages                             nebbo.o/laravel-sheet-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. nebbo.o/laravel-sheet-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

nebbo.o/laravel-sheet-parser
============================

A Laravel package to parse data from public Google Sheets and CSV files using a unified interface.

v2.0.1(7mo ago)23MITPHPPHP ^8.1

Since Jun 24Pushed 7mo agoCompare

[ Source](https://github.com/nebojsha-mitikj/laravel-sheet-parser)[ Packagist](https://packagist.org/packages/nebbo.o/laravel-sheet-parser)[ RSS](/packages/nebboo-laravel-sheet-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Laravel Sheet Parser 🚀
======================

[](#laravel-sheet-parser-)

A Laravel package to parse data from CSV files and public Google Sheets using a unified interface.

Features
--------

[](#features)

- Parse CSV files or public Google Sheets seamlessly.
- Consistent API for both data sources.
- Convert to arrays, JSON, or Laravel collections.
- Retrieve rows, columns, headers, or specific data points.

---

Installation
------------

[](#installation)

Require the package via Composer:

```
composer require nebbo.o/laravel-sheet-parser
```

---

Usage
-----

[](#usage)

### 1. Parsing CSV files

[](#1-parsing-csv-files)

```
use NebboO\LaravelSheetParser\SheetParser;

$parser = SheetParser::fromCsv(storage_path('data/example.csv'));

$data = $parser->toArray(); // Convert to array
$json = $parser->toJson(); // Convert to JSON
$collection = $parser->toCollection(); // Convert to collection
```

### 2. Parsing Google Sheets

[](#2-parsing-google-sheets)

Make sure the sheet is publicly accessible (Anyone with the link can view).

```
use NebboO\LaravelSheetParser\SheetParser;

$url = 'https://docs.google.com/spreadsheets/d/your-sheet-id/edit?usp=sharing';
$parser = SheetParser::fromGoogleSheet($url);

$data = $parser->toArray(); // Convert to array
$json = $parser->toJson(); // Convert to JSON
$collection = $parser->toCollection(); // Convert to collection
```

---

API Reference
-------------

[](#api-reference)

Both `CsvParser` and `GoogleSheetParser` implement the same `ParserInterface`.

#### Methods

[](#methods)

  Method Description   `toArray(): array` Returns the data as an array of associative arrays (using headers as keys).   `toJson(): string` Returns the data as JSON.   `toCollection(): \Illuminate\Support\Collection` Returns the data as a Laravel collection.   `headers(): array` Returns the headers row.   `count(): int` Returns the number of data rows (excluding headers).   `row(int $index): ?array` Returns a specific row by index.   `column(string $header): array` Returns all values from a specific column.   `first(): ?array` Returns the first row of data.   `last(): ?array` Returns the last row of data.   `hasHeader(string $header): bool` Checks if a given header exists. ---

Error Handling
--------------

[](#error-handling)

The package provides custom exceptions you can catch to handle errors gracefully:

- `FileNotFoundException` – CSV file does not exist.
- `FileNotReadableException` – CSV file cannot be read.
- `InvalidFileTypeException` – File is not a CSV.
- `InvalidGoogleSheetUrlException` – Invalid or missing Google Sheet URL.
- `GoogleSheetDownloadException` – Failed to fetch or parse Google Sheet data.

---

Requirements
------------

[](#requirements)

- `PHP` 8.1+
- `Laravel` 10, 11, or 12

---

License
-------

[](#license)

This package is open-sourced software licensed under the MIT license

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance64

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Every ~25 days

Total

5

Last Release

221d ago

Major Versions

v1.0.2 → v2.0.02025-09-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f0049adfd39dd6060adcbb2698eaa39c3509430ce3ef0ca000d20f8fb642434?d=identicon)[nebojsha-mitikj](/maintainers/nebojsha-mitikj)

---

Top Contributors

[![nebojsha-mitikj](https://avatars.githubusercontent.com/u/122390352?v=4)](https://github.com/nebojsha-mitikj "nebojsha-mitikj (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nebboo-laravel-sheet-parser/health.svg)

```
[![Health](https://phpackages.com/badges/nebboo-laravel-sheet-parser/health.svg)](https://phpackages.com/packages/nebboo-laravel-sheet-parser)
```

###  Alternatives

[spatie/laravel-sitemap

Create and generate sitemaps with ease

2.6k14.6M107](/packages/spatie-laravel-sitemap)[ultrono/laravel-sitemap

Sitemap generator for Laravel 11, 12 and 13

36412.6k6](/packages/ultrono-laravel-sitemap)[mischasigtermans/laravel-toon

Token-Optimized Object Notation encoder/decoder for Laravel with intelligent nested object handling

13113.1k](/packages/mischasigtermans-laravel-toon)[dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your administrator's dashboard.

37116.4k](/packages/dniccum-nova-documentation)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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