{"id":13393598,"url":"https://github.com/qax-os/excelize","last_synced_at":"2025-12-15T03:39:50.728Z","repository":{"id":37289321,"uuid":"66841911","full_name":"qax-os/excelize","owner":"qax-os","description":"Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets","archived":false,"fork":false,"pushed_at":"2025-04-28T01:43:13.000Z","size":6858,"stargazers_count":19014,"open_issues_count":118,"forks_count":1773,"subscribers_count":248,"default_branch":"master","last_synced_at":"2025-05-06T14:51:26.011Z","etag":null,"topics":["analytics","chart","data-science","ecma-376","excel","excelize","formula","go","golang","microsoft","office","ooxml","openxml","spreadsheet","statistics","table","vba","visualization","xlsx","xml"],"latest_commit_sha":null,"homepage":"https://xuri.me/excelize","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qax-os.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"xuri","open_collective":"excelize","patreon":"xuri","ko_fi":"xurime","liberapay":"xuri","issuehunt":"xuri","custom":"https://www.paypal.com/paypalme/xuri"}},"created_at":"2016-08-29T12:32:12.000Z","updated_at":"2025-05-06T10:15:26.000Z","dependencies_parsed_at":"2023-11-20T05:03:53.137Z","dependency_job_id":"0889deb2-4d30-48b8-9f1b-d5263f2e73f1","html_url":"https://github.com/qax-os/excelize","commit_stats":{"total_commits":1159,"total_committers":246,"mean_commits":4.711382113821138,"dds":"0.28731665228645387","last_synced_commit":"9934bf5c86343ecc32b96454aa8b0b63f99c77bb"},"previous_names":["360entsecgroup-skylar/excelize","xuri/excelize","luxurioust/excelize"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qax-os%2Fexcelize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qax-os%2Fexcelize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qax-os%2Fexcelize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qax-os%2Fexcelize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qax-os","download_url":"https://codeload.github.com/qax-os/excelize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804223,"owners_count":21806773,"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":["analytics","chart","data-science","ecma-376","excel","excelize","formula","go","golang","microsoft","office","ooxml","openxml","spreadsheet","statistics","table","vba","visualization","xlsx","xml"],"created_at":"2024-07-30T17:00:56.693Z","updated_at":"2025-12-15T03:39:50.637Z","avatar_url":"https://github.com/qax-os.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"650\" src=\"./excelize.svg\" alt=\"Excelize logo\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/xuri/excelize/actions/workflows/go.yml\"\u003e\u003cimg src=\"https://github.com/xuri/excelize/actions/workflows/go.yml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/qax-os/excelize\"\u003e\u003cimg src=\"https://codecov.io/gh/qax-os/excelize/branch/master/graph/badge.svg\" alt=\"Code Coverage\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/xuri/excelize/v2\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/xuri/excelize/v2\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/xuri/excelize/v2\"\u003e\u003cimg src=\"https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\" alt=\"go.dev\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/BSD-3-Clause\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-bsd-orange.svg\" alt=\"Licenses\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.paypal.com/paypalme/xuri\"\u003e\u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-green.svg\" alt=\"Donate\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Excelize\n\n## Introduction\n\nExcelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and writing spreadsheet documents generated by Microsoft Excel\u0026trade; 2007 and later. Supports complex components by high compatibility, and provided streaming API for generating or reading data from a worksheet with huge amounts of data. This library needs Go version 1.23 or later. The full docs can be seen using go's built-in documentation tool, or online at [go.dev](https://pkg.go.dev/github.com/xuri/excelize/v2) and [docs reference](https://xuri.me/excelize/).\n\n## Basic Usage\n\n### Installation\n\n```bash\ngo get github.com/xuri/excelize\n```\n\n- If your packages are managed using [Go Modules](https://go.dev/blog/using-go-modules), please install with following command.\n\n```bash\ngo get github.com/xuri/excelize/v2\n```\n\n### Create spreadsheet\n\nHere is a minimal example usage that will create spreadsheet file.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/xuri/excelize/v2\"\n)\n\nfunc main() {\n    f := excelize.NewFile()\n    defer func() {\n        if err := f.Close(); err != nil {\n            fmt.Println(err)\n        }\n    }()\n    // Create a new sheet.\n    index, err := f.NewSheet(\"Sheet2\")\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    // Set value of a cell.\n    f.SetCellValue(\"Sheet2\", \"A2\", \"Hello world.\")\n    f.SetCellValue(\"Sheet1\", \"B2\", 100)\n    // Set active sheet of the workbook.\n    f.SetActiveSheet(index)\n    // Save spreadsheet by the given path.\n    if err := f.SaveAs(\"Book1.xlsx\"); err != nil {\n        fmt.Println(err)\n    }\n}\n```\n\n### Reading spreadsheet\n\nThe following constitutes the bare to read a spreadsheet document.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/xuri/excelize/v2\"\n)\n\nfunc main() {\n    f, err := excelize.OpenFile(\"Book1.xlsx\")\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    defer func() {\n        // Close the spreadsheet.\n        if err := f.Close(); err != nil {\n            fmt.Println(err)\n        }\n    }()\n    // Get value from cell by given worksheet name and cell reference.\n    cell, err := f.GetCellValue(\"Sheet1\", \"B2\")\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Println(cell)\n    // Get all the rows in the Sheet1.\n    rows, err := f.GetRows(\"Sheet1\")\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    for _, row := range rows {\n        for _, colCell := range row {\n            fmt.Print(colCell, \"\\t\")\n        }\n        fmt.Println()\n    }\n}\n```\n\n### Add chart to spreadsheet file\n\nWith Excelize chart generation and management is as easy as a few lines of code. You can build charts based on data in your worksheet or generate charts without any data in your worksheet at all.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"650\" src=\"./test/images/chart.png\" alt=\"Excelize\"\u003e\u003c/p\u003e\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/xuri/excelize/v2\"\n)\n\nfunc main() {\n    f := excelize.NewFile()\n    defer func() {\n        if err := f.Close(); err != nil {\n            fmt.Println(err)\n        }\n    }()\n    for idx, row := range [][]interface{}{\n        {nil, \"Apple\", \"Orange\", \"Pear\"}, {\"Small\", 2, 3, 3},\n        {\"Normal\", 5, 2, 4}, {\"Large\", 6, 7, 8},\n    } {\n        cell, err := excelize.CoordinatesToCellName(1, idx+1)\n        if err != nil {\n            fmt.Println(err)\n            return\n        }\n        f.SetSheetRow(\"Sheet1\", cell, \u0026row)\n    }\n    if err := f.AddChart(\"Sheet1\", \"E1\", \u0026excelize.Chart{\n        Type: excelize.Col3DClustered,\n        Series: []excelize.ChartSeries{\n            {\n                Name:       \"Sheet1!$A$2\",\n                Categories: \"Sheet1!$B$1:$D$1\",\n                Values:     \"Sheet1!$B$2:$D$2\",\n            },\n            {\n                Name:       \"Sheet1!$A$3\",\n                Categories: \"Sheet1!$B$1:$D$1\",\n                Values:     \"Sheet1!$B$3:$D$3\",\n            },\n            {\n                Name:       \"Sheet1!$A$4\",\n                Categories: \"Sheet1!$B$1:$D$1\",\n                Values:     \"Sheet1!$B$4:$D$4\",\n            }},\n        Title: []excelize.RichTextRun{\n            {\n                Text: \"Fruit 3D Clustered Column Chart\",\n            },\n        },\n    }); err != nil {\n        fmt.Println(err)\n        return\n    }\n    // Save spreadsheet by the given path.\n    if err := f.SaveAs(\"Book1.xlsx\"); err != nil {\n        fmt.Println(err)\n    }\n}\n```\n\n### Add picture to spreadsheet file\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    _ \"image/gif\"\n    _ \"image/jpeg\"\n    _ \"image/png\"\n\n    \"github.com/xuri/excelize/v2\"\n)\n\nfunc main() {\n    f, err := excelize.OpenFile(\"Book1.xlsx\")\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    defer func() {\n        // Close the spreadsheet.\n        if err := f.Close(); err != nil {\n            fmt.Println(err)\n        }\n    }()\n    // Insert a picture.\n    if err := f.AddPicture(\"Sheet1\", \"A2\", \"image.png\", nil); err != nil {\n        fmt.Println(err)\n    }\n    // Insert a picture to worksheet with scaling.\n    if err := f.AddPicture(\"Sheet1\", \"D2\", \"image.jpg\",\n        \u0026excelize.GraphicOptions{ScaleX: 0.5, ScaleY: 0.5}); err != nil {\n        fmt.Println(err)\n    }\n    // Insert a picture offset in the cell with printing support.\n    enable, disable := true, false\n    if err := f.AddPicture(\"Sheet1\", \"H2\", \"image.gif\",\n        \u0026excelize.GraphicOptions{\n            PrintObject:     \u0026enable,\n            LockAspectRatio: false,\n            OffsetX:         15,\n            OffsetY:         10,\n            Locked:          \u0026disable,\n        }); err != nil {\n        fmt.Println(err)\n    }\n    // Save the spreadsheet with the origin path.\n    if err = f.Save(); err != nil {\n        fmt.Println(err)\n    }\n}\n```\n\n## Contributing\n\nContributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change. XML is compliant with [part 1 of the 5th edition of the ECMA-376 Standard for Office Open XML](https://www.ecma-international.org/publications-and-standards/standards/ecma-376/).\n\n## Licenses\n\nThis program is under the terms of the BSD 3-Clause License. See [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause).\n\nThe Excel logo is a trademark of [Microsoft Corporation](https://aka.ms/trademarks-usage). This artwork is an adaptation.\n\ngopher.{ai,svg,png} was created by [Takuya Ueda](https://twitter.com/tenntenn). Licensed under the [Creative Commons 3.0 Attributions license](http://creativecommons.org/licenses/by/3.0/).\n","funding_links":["https://github.com/sponsors/xuri","https://opencollective.com/excelize","https://patreon.com/xuri","https://ko-fi.com/xurime","https://liberapay.com/xuri","https://issuehunt.io/r/xuri","https://www.paypal.com/paypalme/xuri"],"categories":["Problemas encontrados","Popular","Go","Repositories","Go 程序设计","📚 Projects (1974 total)","Microsoft Office","Microsoft Excel","Task Automation \u0026 Workflow Orchestration","开发工具\u0026框架"],"sub_categories":["Fichero XLS","网络服务_其他","Tools \u0026 Libraries","Microsoft Excel","Job Automation Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqax-os%2Fexcelize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqax-os%2Fexcelize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqax-os%2Fexcelize/lists"}