{"id":37190630,"url":"https://github.com/miaomiao3/xlsxutil","last_synced_at":"2026-01-14T22:00:52.049Z","repository":{"id":43366964,"uuid":"285022973","full_name":"miaomiao3/xlsxutil","owner":"miaomiao3","description":"golang reader and writer for csv/xlsx ","archived":false,"fork":false,"pushed_at":"2022-03-05T11:05:10.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T17:38:45.706Z","etag":null,"topics":["csv","excel","go","golang","reflect"],"latest_commit_sha":null,"homepage":"","language":"Go","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/miaomiao3.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}},"created_at":"2020-08-04T15:34:40.000Z","updated_at":"2022-08-30T11:12:23.000Z","dependencies_parsed_at":"2022-09-21T01:42:25.457Z","dependency_job_id":null,"html_url":"https://github.com/miaomiao3/xlsxutil","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/miaomiao3/xlsxutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaomiao3%2Fxlsxutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaomiao3%2Fxlsxutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaomiao3%2Fxlsxutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaomiao3%2Fxlsxutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miaomiao3","download_url":"https://codeload.github.com/miaomiao3/xlsxutil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miaomiao3%2Fxlsxutil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","excel","go","golang","reflect"],"created_at":"2026-01-14T22:00:51.342Z","updated_at":"2026-01-14T22:00:52.013Z","avatar_url":"https://github.com/miaomiao3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI status](https://github.com/miaomiao3/xlsxutil/actions/workflows/main.yml/badge.svg)\n[![stability-unstable](https://img.shields.io/badge/stability-unstable-yellow.svg)](https://github.com/emersion/stability-badges#stable)\n\n## xlsxutil\nSuper-fast to read and write csv or xlsx files.\n\n# Feature\n* Simple api. Only `*Load` and `*Dump` function.\n* Struct inline support\n* `precision` tag to set precision for xlsx\n* Support separator when dump csv\n\n# Limit\n* Only support string and numeric data type\n\n***\n## Usage\n`xls` tag is used in this repo.  \nPay attention to keys:\n* `inline` for extract struct\n* `precision` for `floats` data type precision control.\n\nRefer to example for more cases.\n \n\n\n# Quickstart\n\nGet codes  \n` $ go get github.com/miaomiao3/xlsxutil`\n\nImport  \n`import ( \"github.com/miaomiao3/xlsxutil\" )`\n\n***\nSupposed a csv document content:\n\n```$xslt\nname,money,age,school,address\nn-0,1.2345678900,20,school-0,hali-0\nn-1,1.2345678900,21,school-1,hali-1\nn-2,1.2345678900,22,school-2,hali-2\nn-3,1.2345678900,23,school-3,hali-3\nn-4,1.2345678900,24,school-4,hali-4\n```\nTo bind this csv to out data, and dump data to csv string, just like\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/miaomiao3/xlsxutil\"\n)\n\nconst (\n\tcsvFilePath = \"people.csv\"\n)\n\ntype Person struct {\n\tName  string  `xls:\"name\"`\n\tMoney float64 `xls:\"money,precision:2\"`\n\tAge   int     `xls:\"age\"`\n\tEdu   `xls:\",inline\"`\n}\n\ntype Edu struct {\n\tSchool  string `xls:\"school\"`\n\tAddress string `xls:\"address\"`\n}\n\nfunc main() {\n\tpersons := make([]*Person, 0)\n\terr := xlsxutil.CsvLoad(csvFilePath, \",\", \u0026persons)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"persons:\", persons)\n\n\tbuf, err := xlsxutil.CsvDump(\",\", persons)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"buf\")\n\tfmt.Println(buf)\n}\n\n```\nterminal output:\n```$xslt\n$ go run main.go\npersons: [0xc000078140 0xc000078180 0xc0000781c0 0xc000078200 0xc000078240]\nbuf\nname,money,age,school,address\nn-0,1.23,20,school-0,hali-0\nn-1,1.23,21,school-1,hali-1\nn-2,1.23,22,school-2,hali-2\nn-3,1.23,23,school-3,hali-3\nn-4,1.23,24,school-4,hali-4\n\n```\n\n# Examples\nFor other examples, Please refer to [examples](https://github.com/miaomiao3/xlsxutil/tree/master/example) dir.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiaomiao3%2Fxlsxutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiaomiao3%2Fxlsxutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiaomiao3%2Fxlsxutil/lists"}