{"id":22290709,"url":"https://github.com/ikkez/f3-sheet","last_synced_at":"2025-07-28T23:31:42.604Z","repository":{"id":56989778,"uuid":"100016739","full_name":"ikkez/f3-sheet","owner":"ikkez","description":"Some Excel and CSV utilities for PHP Fat-Free Framework","archived":false,"fork":false,"pushed_at":"2024-03-06T16:19:50.000Z","size":27,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T01:34:39.584Z","etag":null,"topics":["csv","csv-utilities","excel","fat-free-framework"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikkez.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}},"created_at":"2017-08-11T09:39:17.000Z","updated_at":"2025-02-26T23:51:35.000Z","dependencies_parsed_at":"2023-01-31T02:15:33.350Z","dependency_job_id":null,"html_url":"https://github.com/ikkez/f3-sheet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ikkez/f3-sheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkez%2Ff3-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkez%2Ff3-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkez%2Ff3-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkez%2Ff3-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikkez","download_url":"https://codeload.github.com/ikkez/f3-sheet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikkez%2Ff3-sheet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267604302,"owners_count":24114521,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["csv","csv-utilities","excel","fat-free-framework"],"created_at":"2024-12-03T17:13:50.667Z","updated_at":"2025-07-28T23:31:42.307Z","avatar_url":"https://github.com/ikkez.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Sheet\n\nSome Excel and CSV utilities for PHP Fat-Free Framework.\n\n#### Example from Array of Data\n\n```php\n$excel = \\Sheet::instance();\n\n// data array\n$rows = [ \n\t[\n\t\t\"name\" =\u003e \"rose\",\n\t\t\"color\" =\u003e \"red\",\n\t\t\"num\" =\u003e 15\n\t],\n\t[\n\t\t\"name\" =\u003e \"daisy\",\n\t\t\"color\" =\u003e \"yellow\",\n\t\t\"num\" =\u003e 25,\n\t],\n\t[\n\t\t\"name\" =\u003e \"orchid\",\n\t\t\"color\" =\u003e \"purple\",\n\t\t\"num\" =\u003e 7\n\t]\n];\n// header array to rename the field labels and sort/reorder the data array \n$headers = ['name'=\u003e'Name', 'num'=\u003e'Number', 'color'=\u003e'Flower Color'];\n\n$excel-\u003erenderXLS($rows,$headers,\"flowers.xls\");\n```\n\nIn case your data array is not keyed, you can use the `applyHeader` method to transform the array:\n\n```php\n$rows = [ \n\t[\n\t\t\"rose\",\n\t\t\"red\",\n\t\t15\n\t],\n\t[\n\t\t\"daisy\",\n\t\t\"yellow\",\n\t\t25,\n\t],\n\t[\n\t\t\"orchid\",\n\t\t\"purple\",\n\t\t7\n\t]\n];\n$rows = \\Sheet::instance()-\u003eapplyHeader($rows,['name','color','num']);\n\n```\n\n#### Example from Fat Free Mapper Object\n\n```\n//Setup mapper\n$items = new \\DB\\SQL\\Mapper($db,'mytable');\n\n//Load all items and map to associative array\n$all = array_map(array($items,'cast'),$items-\u003efind());\n\n$csv = \\Sheet::instance();\n$csv-\u003erenderCSV($all, $items-\u003efields(), \"items.csv\");\n```\n\n\n#### Notice\nThe generated XLS can have problems in older versions of MS Office (Excel) with number-formatted fields not being recognized as such (displayed as text instead) and text fields, that contain line breaks can also leads to problems there (missing text). \n\nNevertheless, these problems do not appear when opened with LibreOffice or OpenOffice or rendered as csv with `renderCSV` instead and then imported to excel.\n \n \n## License\n\nYou are allowed to use this plugin under the terms of the GNU General Public License version 3 or later.\n\nCopyright (C) 2017 Christian Knuth [ikkez]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikkez%2Ff3-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikkez%2Ff3-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikkez%2Ff3-sheet/lists"}