PHPackages                             gekkone/table-data-accessors - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. gekkone/table-data-accessors

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

gekkone/table-data-accessors
============================

A common interface for accessing table data. Contains implementations for csv and google spreadsheets

1.1.1(2y ago)013CC-BY-4.0PHP

Since Aug 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gekkone/table-data-accessors)[ Packagist](https://packagist.org/packages/gekkone/table-data-accessors)[ RSS](/packages/gekkone-table-data-accessors/feed)WikiDiscussions main Synced 1mo ago

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

Table Data Accessors
====================

[](#table-data-accessors)

A common interface for accessing table data on PHP. Contains implementations for csv and google spreadsheets

Details
-------

[](#details)

An extended iterator interface is provided to access tabular data.

 src/TableIteratorInterface.php line 7:11```
interface TableIteratorInterface extends Iterator
{
    public function fetchRowCount(bool $skipEmpty = false): int;
    public function currentField(string $field, $default = null);
}
```

> ⚠️ **Attention:** The data of the first row is used as keys in the associative array returned for each of the rows

Code Examples
-------------

[](#code-examples)

Simple read from csv file:

```
use Gekkone\TdaLib\Accessor\Csv;
use GuzzleHttp\Psr7\Stream;

$accessor = new Csv(
    Csv\TableOptions::new(new Stream(fopen(__DIR__ . '/filename.csv', 'r')))
);

foreach ($accessor as $row => $fields) {
    // $fields = ['columnHeader' => mixed, ...] or [(int) columnIndex => mixed, ...]
}
```

Simple read from Google Sheet

```
use Gekkone\TdaLib\Accessor\GoogleSheet;
use Google\Client;
use Google\Service\Sheets;

$googleCline = new Client([
    'scopes' => Sheets::SPREADSHEETS_READONLY
]);

// for read first sheet
$accessor = new GoogleSheet(
    GoogleSheet\TableOptions::new(new Sheets($googleCline), 'spreadsheetId')
);

// for read concreate sheet set sheetId, find it in url after '#gid=',
// example https://docs.google.com/spreadsheets/d//edit#gid=1737163713)
$accessor = new GoogleSheet(
    GoogleSheet\TableOptions::new(new Sheets($googleCline), 'spreadsheetId', 1737163713)
);

foreach ($accessor as $row => $fields) {
    // $fields = ['columnHeader' => mixed, ...] or [(int) columnIndex => mixed, ...]
}
```

[ ![Creative Commons License](https://camo.githubusercontent.com/dde62adfa88dac8de0fd193fd531088d21a3b388e69f6eb17dfa6294dbc4bdef/68747470733a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792f342e302f38387833312e706e67)](http://creativecommons.org/licenses/by/4.0/)
This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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 ~79 days

Total

3

Last Release

843d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/764476c8716456da9ec0242f15c423ca0528a17e0950a07abc44551f6c3a85f0?d=identicon)[gekkone](/maintainers/gekkone)

---

Top Contributors

[![gekkone](https://avatars.githubusercontent.com/u/13663086?v=4)](https://github.com/gekkone "gekkone (13 commits)")

---

Tags

csvgoogle-sheetsgoogle-spreadsheetstable data reader

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gekkone-table-data-accessors/health.svg)

```
[![Health](https://phpackages.com/badges/gekkone-table-data-accessors/health.svg)](https://phpackages.com/packages/gekkone-table-data-accessors)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[league/csv

CSV data manipulation made easy in PHP

3.5k166.1M646](/packages/league-csv)[rap2hpoutre/fast-excel

Fast Excel import/export for Laravel

2.3k24.9M47](/packages/rap2hpoutre-fast-excel)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[goodby/csv

CSV import/export library

9555.6M23](/packages/goodby-csv)[sonata-project/exporter

Lightweight Exporter library

44920.9M35](/packages/sonata-project-exporter)

PHPackages © 2026

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