{"id":16105772,"url":"https://github.com/devlights/goxcel","last_synced_at":"2025-08-14T19:29:32.000Z","repository":{"id":48290961,"uuid":"238426555","full_name":"devlights/goxcel","owner":"devlights","description":"Goxcel is a library to operate MS Excel using go-ole library.","archived":false,"fork":false,"pushed_at":"2024-09-04T09:26:10.000Z","size":191,"stargazers_count":16,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T02:35:04.111Z","etag":null,"topics":["excel","go","golang","win32com","windows"],"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/devlights.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":"2020-02-05T10:43:58.000Z","updated_at":"2025-02-24T14:22:28.000Z","dependencies_parsed_at":"2024-03-15T07:47:14.615Z","dependency_job_id":null,"html_url":"https://github.com/devlights/goxcel","commit_stats":{"total_commits":139,"total_committers":1,"mean_commits":139.0,"dds":0.0,"last_synced_commit":"751cd53ce5ba85dd2a0e16eec03dcdc7f7b06fad"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgoxcel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgoxcel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgoxcel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlights%2Fgoxcel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devlights","download_url":"https://codeload.github.com/devlights/goxcel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243875054,"owners_count":20361935,"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","go","golang","win32com","windows"],"created_at":"2024-10-09T19:10:35.001Z","updated_at":"2025-03-17T17:31:34.852Z","avatar_url":"https://github.com/devlights.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goxcel\n\nGoxcel is a library to operate Excel using [go-ole](https://github.com/go-ole/go-ole) package. Thanks [go-ole](https://github.com/go-ole/go-ole) package! \n\nThis library works only on Windows.\n\n[![CodeFactor](https://www.codefactor.io/repository/github/devlights/goxcel/badge)](https://www.codefactor.io/repository/github/devlights/goxcel)\n![Goxcel - Go Version](https://img.shields.io/badge/go-1.19-blue.svg)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/devlights/goxcel)](https://pkg.go.dev/github.com/devlights/goxcel)\n\n## Install\n\n```sh\ngo get github.com/devlights/goxcel@latest\n```\n\n## Usage\n\n### Import statement\n\n```go\npackage main\n\nimport (\n    \"github.com/devlights/goxcel\"\n)\n\nfunc init() {\n\tlog.SetFlags(0)\n}\n\n// main is entry point of this app.\nfunc main() {\n\tret, xlsx := run()\n\tif ret == 0 {\n\t\t// Launch EXCEL\n\t\t_ = exec.Command(\"cmd\", \"/C\", xlsx).Run()\n\t}\n\n\tos.Exit(ret)\n}\n\nfunc run() (int, string) {\n\t// 0. Initialize Goxcel\n\tquit := goxcel.MustInitGoxcel()\n\tdefer quit()\n\n\t// 1. Create new Goxcel instance.\n\texcel, release := goxcel.MustNewGoxcel()\n\n\t// must call goxcel release function when function exited\n\t// otherwise excel process was remained.\n\tdefer release()\n\n\t// optional settings\n\tvisible := false\n\texcel.MustSilent(visible)\n\n\t// 2. Get Workbooks instance.\n\twbs := excel.MustWorkbooks()\n\n\t// 3. Add Workbook\n\twb, wbRelease := wbs.MustAdd()\n\n\t// call workbook's release function\n\tdefer wbRelease()\n\n\t// 4. Get Worksheet\n\tws := wb.MustSheets(1)\n\n\t// 5. Get Cell\n\tc := ws.MustCells(1, 1)\n\n\t// 6. Set the value to cell\n\tc.MustSetValue(\"こんにちはWorld\")\n\n\tp := filepath.Join(os.TempDir(), \"helloworld.xlsx\")\n\tlog.Printf(\"SAVE FILE: %s\\n\", p)\n\n\t// 7. Save\n\twb.MustSaveAs(p)\n\n\t// Workbook::SetSaved(true) and Workbook::Close() is automatically called when `defer wbReleaseFn()`.\n\t// Excel::Quit() and Excel::Release() is automatically called when `defer release()`.\n\n\treturn 0, p\n}\n```\n\nAlso look at the \"examples\" directory :)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlights%2Fgoxcel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlights%2Fgoxcel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlights%2Fgoxcel/lists"}