{"id":16988521,"url":"https://github.com/chaoyangnz/ooxml-lite","last_synced_at":"2025-10-08T21:54:36.734Z","repository":{"id":145177056,"uuid":"312923342","full_name":"chaoyangnz/ooxml-lite","owner":"chaoyangnz","description":"Tired of bad performance of POI? time to try a new alternative! Templating + Data = Excel. Do right things with its native language: OOXML.","archived":false,"fork":false,"pushed_at":"2020-11-24T01:44:57.000Z","size":526,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T02:41:22.257Z","etag":null,"topics":["excel","ooxml","reporting","spreadsheet","spreadsheet-render","spreadsheetml"],"latest_commit_sha":null,"homepage":"","language":"Java","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/chaoyangnz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-14T23:47:25.000Z","updated_at":"2020-11-24T01:44:59.000Z","dependencies_parsed_at":"2023-03-23T18:17:00.305Z","dependency_job_id":null,"html_url":"https://github.com/chaoyangnz/ooxml-lite","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.2666666666666667,"last_synced_commit":"165bd571ef641aa8774361f4a8ea3a0467760570"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chaoyangnz/ooxml-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoyangnz%2Fooxml-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoyangnz%2Fooxml-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoyangnz%2Fooxml-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoyangnz%2Fooxml-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaoyangnz","download_url":"https://codeload.github.com/chaoyangnz/ooxml-lite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaoyangnz%2Fooxml-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000692,"owners_count":26082837,"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-10-08T02:00:06.501Z","response_time":56,"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":["excel","ooxml","reporting","spreadsheet","spreadsheet-render","spreadsheetml"],"created_at":"2024-10-14T03:04:14.603Z","updated_at":"2025-10-08T21:54:36.707Z","avatar_url":"https://github.com/chaoyangnz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ooxml-lite\n\nGenerate Spreadsheet (Microsoft Excel or any OOXML compatible Spreadsheet) with templating.\n\nWithout the need to build from the scatch, the processing is in milliseconds 🚀.\n\nExcel is related to OOXML, so we build with it.\n\n\n## Get started\n\n### Install\n\nGradle\n\n```gradle\ncompile 'ooxml:ooxml-lite:0.0.1'\n```\n\n### Templating your worksheets\n\n```xml\n\u003ccols\u003e\n    \u003ccol min=\"1\" max=\"1\" width=\"32.2265625\" customWidth=\"true\"/\u003e\n    \u003ccol min=\"2\" max=\"2\" width=\"32.2265625\" customWidth=\"true\"/\u003e\n    \u003ccol min=\"3\" max=\"3\" width=\"32.2265625\" customWidth=\"true\"/\u003e\n    \u003ccol min=\"4\" max=\"4\" width=\"32.2265625\" customWidth=\"true\"/\u003e\n    \u003ccol min=\"5\" max=\"5\" width=\"20.0\" customWidth=\"true\"/\u003e\n\u003c/cols\u003e\n\u003csheetData\u003e\n    \u003c#list data as row\u003e\n    \u003c#assign i = row?index\u003e\n    \u003crow r=\"${i}\" ht=\"45.0\" customHeight=\"true\"\u003e\n        \u003c@c t=\"s\" s=\"4\" r=\"${i}\" c=\"1\"\u003e\n            \u003cr\u003e\n                \u003ct\u003e${row.worker!}\u003c/t\u003e\n            \u003c/r\u003e\n            \u003cr\u003e\n                \u003crPr\u003e\n                    \u003csz val=\"7\"/\u003e\n                    \u003crFont val=\"Roboto light\"/\u003e\n                    \u003ccharset val=\"134\"/\u003e\n                \u003c/rPr\u003e\n                \u003ct xml:space=\"preserve\"\u003e\u0026#10;${row.title!}\u0026#10;EID ${row.eid!}\u003c/t\u003e\n            \u003c/r\u003e\n        \u003c/@c\u003e\n\n        \u003c@c t=\"n\" s=\"5\" r=\"${i}\" c=\"2\"\u003e\n            ${row.regularTime}\n        \u003c/@c\u003e\n\n        \u003c@c t=\"n\" s=\"5\" r=\"${i}\" c=\"3\"\u003e\n            ${row.overTime}\n        \u003c/@c\u003e\n\n        \u003c@c t=\"n\" s=\"5\" r=\"${i}\" c=\"4\"\u003e\n            ${row.doubleTime}\n        \u003c/@c\u003e\n\n        \u003c@c t=\"str\" s=\"5\" r=\"${i}\" c=\"5\" f=\"SUM(B${i}:D${i})\"\u003e\n            ${row.total}\n        \u003c/@c\u003e\n    \u003c/row\u003e\n    \u003c/#list\u003e\n\u003c/sheetData\u003e\n```\n\nsee more examples in [src/test/resources/](src/test/resources/).\n\n### Start rendering\n\n```java\nWorkbook workbook = new Workbook();\nWorksheet worksheet1 = workbook.createSheet(\"sheet1.xml.ftl\", \"Summary\");\nworksheet1.setData(data1);\n\nWorksheet worksheet2 = workbook.createSheet(\"sheet2.xml.ftl\", \"Detailed\");\nworksheet2.setData(data2);\n\nFile excel = workbook.render();\n```\n\nOpen your Excel in temp directory. \n\n## Extensions of SpreadML syntax\n\n### render column\n\nWe defined `@c` directive which has the similar attributes of OOXML `\u003cc\u003e..\u003c/c\u003e` cell tag.\n\n```xml\n\u003c@c t=\"str\" s=\"5\" r=\"${i}\" c=\"5\" f=\"SUM(B1:D1)\"\u003e\n    10\n\u003c/@c\u003e\n```\nwhich is useful when you want to write the same way of inline string but automatically make them to shared strings\n\n### write styles\n\nStyles are defined within sheet templates by a custom directive `\u003c@style\u003e ... \u003c/@style\u003e`.\nYou can use the similar CSS style to define a named style then apply them to cells.\n\n```xml\n\u003c@style\u003e\nheader {\n    font-size: 14;\n    font-name: Robot;\n    border-left-color: red;\n    number-format-cod: '_ * #,##0_ ;_ * \\-#,##0_ ;_ * \u0026quot;-\u0026quot;_ ;_ @_ ';\n}\n\u003c/@style\u003e\n```\n\n### merge cells\n\n```xml\n\u003c@c colspan=2\u003e\u003c/@c\u003e\n```\n\n```xml\n\u003c@c rowspan=4\u003e\u003c/@c\u003e\n```\n\n### Hyperlink\n\n// TODO\n\n### Drawings and Images\n\n// TODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaoyangnz%2Fooxml-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaoyangnz%2Fooxml-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaoyangnz%2Fooxml-lite/lists"}