{"id":24780454,"url":"https://github.com/webgriffe/associative-spreadsheet-iterator","last_synced_at":"2025-03-24T04:40:33.533Z","repository":{"id":17287654,"uuid":"20057885","full_name":"webgriffe/associative-spreadsheet-iterator","owner":"webgriffe","description":"A spreadsheet Iterator based on phpoffice/phpexcel which indexes values by column name.","archived":false,"fork":false,"pushed_at":"2018-03-02T15:33:23.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-29T10:35:53.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webgriffe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-22T10:58:50.000Z","updated_at":"2017-08-01T09:59:17.000Z","dependencies_parsed_at":"2022-08-22T18:50:30.450Z","dependency_job_id":null,"html_url":"https://github.com/webgriffe/associative-spreadsheet-iterator","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Fassociative-spreadsheet-iterator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Fassociative-spreadsheet-iterator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Fassociative-spreadsheet-iterator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Fassociative-spreadsheet-iterator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webgriffe","download_url":"https://codeload.github.com/webgriffe/associative-spreadsheet-iterator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212107,"owners_count":20578438,"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":"2025-01-29T10:30:57.370Z","updated_at":"2025-03-24T04:40:33.505Z","avatar_url":"https://github.com/webgriffe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Associative Spreadsheet Iterator\n================================\n\nThis PHP library allows you to iterate over a spreadsheet in an associative way. Every iterated row is indexed by column name. All formats supported by [phpoffice/phpexcel](https://github.com/PHPOffice/PHPExcel) are supported.\n\nFor example, given a spreadsheet like this:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003ePrice\u003c/th\u003e\n\u003cth\u003eStock\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eRaspberryPi\u003c/td\u003e\n\u003ctd\u003eRaspberry PI Modell B, 512 MB\u003c/td\u003e\n\u003ctd\u003e37.05\u003c/td\u003e\n\u003ctd\u003e12\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSanDisk Ultra SDHC\u003c/td\u003e\n\u003ctd\u003eSanDisk Ultra SDHC 8 GB 30 MB/s Classe 10\u003c/td\u003e\n\u003ctd\u003e6.92\u003c/td\u003e\n\u003ctd\u003e54\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nYou can iterate over this and get every row as associative array like this:\n\n```\narray(\n    array(\n        'Name' =\u003e 'RaspberryPi',\n        'Description' =\u003e 'Raspberry PI Modell B, 512 MB',\n        'Price' =\u003e 37.05,\n        'Stock' =\u003e 12,\n    ),\n    array(\n        'Name' =\u003e 'SanDisk Ultra SDHC',\n        'Description' =\u003e 'SanDisk Ultra SDHC 8 GB 30 MB/s Classe 10',\n        'Price' =\u003e 6.92,\n        'Stock' =\u003e 54,\n    ),\n),\n```\n\nInstallation\n------------\n\nYou can install this library with **Composer**:\n\n\t$ composer require webgriffe/associative-spreadsheet-iterator @stable\n\t\nUsage\n-----\n\nSimply inlcude Composer's autoloader and instantiate the iterator passing the file path:\n\n```\n\u003c?php\n\nrequire 'vendor/autoload.php'\n\n$file = '/path/to/spreadsheet.xlsx';\n$spreadsheetIterator = new Webgriffe\\AssociativeSpreadsheetIterator\\Iterator($file);\n\nforeach ($iterator as $row) {\n\t// $row is an associative array indexed by column name\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Fassociative-spreadsheet-iterator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebgriffe%2Fassociative-spreadsheet-iterator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Fassociative-spreadsheet-iterator/lists"}