{"id":17362214,"url":"https://github.com/kakilangit/excelsior","last_synced_at":"2025-03-27T16:46:38.750Z","repository":{"id":44952869,"uuid":"448513213","full_name":"kakilangit/excelsior","owner":"kakilangit","description":"An excelize wrapper to separate the presentation and business logic","archived":false,"fork":false,"pushed_at":"2024-05-04T08:22:38.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T20:29:39.522Z","etag":null,"topics":["excel","excelize","go"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kakilangit.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":"2022-01-16T09:48:14.000Z","updated_at":"2024-05-04T08:00:06.000Z","dependencies_parsed_at":"2024-05-04T08:39:06.819Z","dependency_job_id":null,"html_url":"https://github.com/kakilangit/excelsior","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakilangit%2Fexcelsior","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakilangit%2Fexcelsior/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakilangit%2Fexcelsior/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kakilangit%2Fexcelsior/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kakilangit","download_url":"https://codeload.github.com/kakilangit/excelsior/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245887932,"owners_count":20688893,"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","excelize","go"],"created_at":"2024-10-15T19:37:25.612Z","updated_at":"2025-03-27T16:46:38.726Z","avatar_url":"https://github.com/kakilangit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/github-kakilangit/excelsior-37a8e0?style=for-the-badge\u0026labelColor=555555\u0026logo=github\" height=\"20\"\u003e](https://github.com/kakilangit/excelsior)\n[\u003cimg alt=\"pkg.go.dev\" src=\"https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge\u0026logo=go\u0026logoColor=white\" height=\"20\"\u003e](https://pkg.go.dev/github.com/kakilangit/excelsior)\n\n![Dall-E generated exelsior image](https://raw.githubusercontent.com/kakilangit/static/main/excelsior/excelsior.png)\n\n# Excelsior\n\nAn excelize wrapper to separate the presentation and business logic.\n\n```shell\n\ngo get -u -v github.com/kakilangit/excelsior\n\n```\n\nExample:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/kakilangit/excelsior\"\n\t\"github.com/xuri/excelize/v2\"\n)\n\n// notFound implements excelsior.SheetData.\ntype notFound []string\n\n// Total return total data.\nfunc (f notFound) Total() int {\n\treturn len(f)\n}\n\n// Row represents excel row.\nfunc (f notFound) Row(i int) excelsior.Row {\n\treturn []any{f[i]}\n}\n\nfunc main() {\n\tdata, err := excelsior.Serialize(func(file *excelize.File, style excelsior.Style) ([]byte, error) {\n\t\tconst sheetName = \"not found alphabet\"\n\n\t\texcelsior.SetDefaultSheetName(file, sheetName)\n\n\t\theaders := []any{\"alphabet\"}\n\t\trows := []string{\"a\", \"b\", \"c\"}\n\n\t\tsheet := excelsior.NewSheet(headers, excelsior.DefaultGetStyleFn, style.Header(), notFound(rows))\n\t\tif err := sheet.Generate(file, sheetName); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\treturn excelsior.Byte(file)\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tf, err := os.Create(\"alphabet.xlsx\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer func() { _ = f.Close() }()\n\n\tif _, err := f.Write(data); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tif err := f.Sync(); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n\n```\n\n## License\n\nMIT\nCopyright (c) 2022 kakilangit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakilangit%2Fexcelsior","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkakilangit%2Fexcelsior","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkakilangit%2Fexcelsior/lists"}