{"id":15035637,"url":"https://github.com/mk-j/php_xlsxwriter","last_synced_at":"2025-05-13T23:07:02.611Z","repository":{"id":37736181,"uuid":"12769892","full_name":"mk-j/PHP_XLSXWriter","owner":"mk-j","description":"Lightweight XLSX Excel Spreadsheet Writer in PHP","archived":false,"fork":false,"pushed_at":"2023-09-25T20:18:25.000Z","size":295,"stargazers_count":1856,"open_issues_count":47,"forks_count":666,"subscribers_count":94,"default_branch":"master","last_synced_at":"2025-04-10T00:14:24.736Z","etag":null,"topics":["excel","php","xlsx"],"latest_commit_sha":null,"homepage":"","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/mk-j.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}},"created_at":"2013-09-11T22:56:46.000Z","updated_at":"2025-04-09T06:08:15.000Z","dependencies_parsed_at":"2023-02-13T19:00:42.945Z","dependency_job_id":"19007e55-14c0-44c4-819d-1c6aeff16948","html_url":"https://github.com/mk-j/PHP_XLSXWriter","commit_stats":{"total_commits":133,"total_committers":31,"mean_commits":4.290322580645161,"dds":0.5639097744360902,"last_synced_commit":"4da41e4f5df8333d17028aabf2a74e7ea71a1116"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-j%2FPHP_XLSXWriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-j%2FPHP_XLSXWriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-j%2FPHP_XLSXWriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mk-j%2FPHP_XLSXWriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mk-j","download_url":"https://codeload.github.com/mk-j/PHP_XLSXWriter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254041059,"owners_count":22004655,"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":["excel","php","xlsx"],"created_at":"2024-09-24T20:29:06.446Z","updated_at":"2025-05-13T23:06:57.601Z","avatar_url":"https://github.com/mk-j.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP_XLSXWriter\n==============\n\nThis library is designed to be lightweight, and have minimal memory usage.\n\nIt is designed to output an Excel compatible spreadsheet in (Office 2007+) xlsx format, with just basic features supported:\n* supports PHP 5.2.1+\n* takes UTF-8 encoded input\n* multiple worksheets\n* supports currency/date/numeric cell formatting, simple formulas\n* supports basic cell styling\n* supports writing huge 100K+ row spreadsheets\n\n[Never run out of memory with PHPExcel again](https://github.com/mk-j/PHP_XLSXWriter).\n\nSimple PHP CLI example:\n```php\n$data = array(\n    array('year','month','amount'),\n    array('2003','1','220'),\n    array('2003','2','153.5'),\n);\n\n$writer = new XLSXWriter();\n$writer-\u003ewriteSheet($data);\n$writer-\u003ewriteToFile('output.xlsx');\n```\n\nSimple/Advanced Cell Formats:\n```php\n$header = array(\n  'created'=\u003e'date',\n  'product_id'=\u003e'integer',\n  'quantity'=\u003e'#,##0',\n  'amount'=\u003e'price',\n  'description'=\u003e'string',\n  'tax'=\u003e'[$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00',\n);\n$data = array(\n    array('2015-01-01',873,1,'44.00','misc','=D2*0.05'),\n    array('2015-01-12',324,2,'88.00','none','=D3*0.05'),\n);\n\n$writer = new XLSXWriter();\n$writer-\u003ewriteSheetHeader('Sheet1', $header );\nforeach($data as $row)\n\t$writer-\u003ewriteSheetRow('Sheet1', $row );\n$writer-\u003ewriteToFile('example.xlsx');\n```\n\n50000 rows: (1.4s, 0MB memory usage)\n```php\ninclude_once(\"xlsxwriter.class.php\");\n$writer = new XLSXWriter();\n$writer-\u003ewriteSheetHeader('Sheet1', array('c1'=\u003e'integer','c2'=\u003e'integer','c3'=\u003e'integer','c4'=\u003e'integer') );\nfor($i=0; $i\u003c50000; $i++)\n{\n    $writer-\u003ewriteSheetRow('Sheet1', array($i, $i+1, $i+2, $i+3) );\n}\n$writer-\u003ewriteToFile('huge.xlsx');\necho '#'.floor((memory_get_peak_usage())/1024/1024).\"MB\".\"\\n\";\n```\n| rows   | time | memory |\n| ------ | ---- | ------ |\n|  50000 | 1.4s | 0MB    |\n| 100000 | 2.7s | 0MB    |\n| 150000 | 4.1s | 0MB    |\n| 200000 | 5.7s | 0MB    |\n| 250000 | 7.0s | 0MB    |\n\nSimple cell formats map to more advanced cell formats\n\n| simple formats | format code |\n| ---------- | ---- |\n| string   | @ |\n| integer  | 0 |\n| date     | YYYY-MM-DD |\n| datetime | YYYY-MM-DD HH:MM:SS |\n| time     | HH:MM:SS |\n| price    | #,##0.00 |\n| dollar   | [$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00 |\n| euro     | #,##0.00 [$€-407];[RED]-#,##0.00 [$€-407] |\n\n\nBasic cell styles have been available since version 0.30\n\n| style        | allowed values |\n| ------------ | ---- |\n| font         | Arial, Times New Roman, Courier New, Comic Sans MS |\n| font-size    | 8,9,10,11,12 ... |\n| font-style   | bold, italic, underline, strikethrough or multiple ie: 'bold,italic' |\n| border       | left, right, top, bottom,   or multiple ie: 'top,left' |\n| border-style | thin, medium, thick, dashDot, dashDotDot, dashed, dotted, double, hair, mediumDashDot, mediumDashDotDot, mediumDashed, slantDashDot |\n| border-color | #RRGGBB, ie: #ff99cc or #f9c |\n| color        | #RRGGBB, ie: #ff99cc or #f9c |\n| fill         | #RRGGBB, ie: #eeffee or #efe |\n| halign       | general, left, right, justify, center |\n| valign       | bottom, center, distributed |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmk-j%2Fphp_xlsxwriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmk-j%2Fphp_xlsxwriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmk-j%2Fphp_xlsxwriter/lists"}