{"id":16390182,"url":"https://github.com/slamdunk/openspout-helper","last_synced_at":"2025-06-20T14:11:16.256Z","repository":{"id":40249721,"uuid":"465768956","full_name":"Slamdunk/openspout-helper","owner":"Slamdunk","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-20T12:58:51.000Z","size":273,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-20T14:10:16.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Slamdunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["Slamdunk"],"custom":"https://paypal.me/filippotessarotto"}},"created_at":"2022-03-03T15:09:44.000Z","updated_at":"2025-06-13T12:11:39.000Z","dependencies_parsed_at":"2024-03-28T13:47:39.544Z","dependency_job_id":"1a5d6660-bb80-41a9-8b37-54d01d429223","html_url":"https://github.com/Slamdunk/openspout-helper","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.32258064516129037","last_synced_commit":"6670cd9e112225dde38abee6969c815f013b64c8"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Slamdunk/openspout-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slamdunk%2Fopenspout-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slamdunk%2Fopenspout-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slamdunk%2Fopenspout-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slamdunk%2Fopenspout-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Slamdunk","download_url":"https://codeload.github.com/Slamdunk/openspout-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slamdunk%2Fopenspout-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260959194,"owners_count":23088822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T04:35:10.457Z","updated_at":"2025-06-20T14:11:11.229Z","avatar_url":"https://github.com/Slamdunk.png","language":"PHP","funding_links":["https://github.com/sponsors/Slamdunk","https://paypal.me/filippotessarotto"],"categories":[],"sub_categories":[],"readme":"# Slam Openspout helper to create organized data table\r\n\r\n[![Latest Stable Version](https://img.shields.io/packagist/v/slam/openspout-helper.svg)](https://packagist.org/packages/slam/openspout-helper)\r\n[![Downloads](https://img.shields.io/packagist/dt/slam/openspout-helper.svg)](https://packagist.org/packages/slam/openspout-helper)\r\n[![CI](https://github.com/Slamdunk/openspout-helper/actions/workflows/ci.yaml/badge.svg)](https://github.com/Slamdunk/openspout-helper/actions/workflows/ci.yaml)\r\n[![Infection MSI](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FSlamdunk%2Fopenspout-helper%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/Slamdunk/openspout-helper/main)\r\n\r\n\r\n## Installation\r\n\r\n`composer require slam/openspout-helper`\r\n\r\n## Usage\r\n\r\n```php\r\nuse OpenSpout\\Writer\\Common\\Creator\\WriterEntityFactory;\r\nuse Slam\\OpenspoutHelper as ExcelHelper;\r\n\r\nrequire __DIR__ . '/vendor/autoload.php';\r\n\r\n// Being an `iterable`, the data can be any dinamically generated content\r\n// for example a PDOStatement set on unbuffered query\r\n$users = [\r\n    [\r\n        'column_1' =\u003e 'John',\r\n        'column_2' =\u003e '123.45',\r\n        'column_3' =\u003e '2017-05-08',\r\n    ],\r\n    [\r\n        'column_1' =\u003e 'Mary',\r\n        'column_2' =\u003e '4321.09',\r\n        'column_3' =\u003e '2018-05-08',\r\n    ],\r\n];\r\n\r\n$columnCollection = new ExcelHelper\\ColumnCollection(...[\r\n    new ExcelHelper\\Column('column_1',  'User',     10,     new ExcelHelper\\CellStyle\\Text()),\r\n    new ExcelHelper\\Column('column_2',  'Amount',   15,     new ExcelHelper\\CellStyle\\Amount()),\r\n    new ExcelHelper\\Column('column_3',  'Date',     15,     new ExcelHelper\\CellStyle\\Date()),\r\n]);\r\n\r\n$XLSXWriter  = WriterEntityFactory::createXLSXWriter();\r\n$XLSXWriter-\u003eopenToFile(__DIR__.'/test.xlsx');\r\n\r\n$activeSheet = $XLSXWriter-\u003egetCurrentSheet();\r\n$activeSheet-\u003esetName('My Users');\r\n$table = new ExcelHelper\\Table($activeSheet, 'My Heading', $users);\r\n$table-\u003esetColumnCollection($columnCollection);\r\n\r\n(new ExcelHelper\\TableWriter())-\u003ewriteTable($XLSXWriter, $table);\r\n$XLSXWriter-\u003eclose();\r\n```\r\n\r\nResult:\r\n\r\n![Example](https://raw.githubusercontent.com/Slamdunk/openspout-helper/master/example.png)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslamdunk%2Fopenspout-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslamdunk%2Fopenspout-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslamdunk%2Fopenspout-helper/lists"}