{"id":13563862,"url":"https://github.com/kataras/sheets","last_synced_at":"2025-04-11T03:51:06.549Z","repository":{"id":57517850,"uuid":"247366817","full_name":"kataras/sheets","owner":"kataras","description":":bar_chart: (Unofficial) A Lightweight Google Spreadsheets Client written in Go","archived":false,"fork":false,"pushed_at":"2024-09-28T18:45:53.000Z","size":48,"stargazers_count":13,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T01:51:10.546Z","etag":null,"topics":[],"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/kataras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-03-14T23:03:50.000Z","updated_at":"2025-01-13T17:51:41.000Z","dependencies_parsed_at":"2024-01-14T03:47:53.810Z","dependency_job_id":"7c18dc30-b979-473c-a0ac-59c769202f6e","html_url":"https://github.com/kataras/sheets","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fsheets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fsheets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fsheets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kataras%2Fsheets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kataras","download_url":"https://codeload.github.com/kataras/sheets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339262,"owners_count":21087214,"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":[],"created_at":"2024-08-01T13:01:24.040Z","updated_at":"2025-04-11T03:51:06.532Z","avatar_url":"https://github.com/kataras.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Sheets\r\n\r\n[![build status](https://img.shields.io/github/actions/workflow/status/kataras/sheets/ci.yml?style=for-the-badge)](https://github.com/kataras/sheets/actions) [![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=for-the-badge)](https://goreportcard.com/report/github.com/kataras/sheets) [![godocs](https://img.shields.io/badge/go-%20docs-488AC7.svg?style=for-the-badge)](https://pkg.go.dev/github.com/kataras/sheets)\r\n\r\nLightweight [Google Spreadsheets](https://docs.google.com/spreadsheets) Client written in Go.\r\n\r\nThis package is under active development and a **work-in-progress** project. You should NOT use it on production. Please consider using the official [Google's Sheets client for Go](https://developers.google.com/sheets/api/quickstart/go) instead.\r\n\r\n## Installation\r\n\r\nThe only requirement is the [Go Programming Language](https://go.dev/dl).\r\n\r\n```sh\r\n$ go get github.com/kataras/sheets@latest\r\n```\r\n\r\n## Getting Started\r\n\r\nFirst of all, navigate to \u003chttps://developers.google.com/sheets/api\u003e and enable the Sheets API Service in your [Google Console](https://console.cloud.google.com/). Place the secret client service account or token file as `client_secret.json` near the executable example.\r\n\r\nExample Code:\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"context\"\r\n    \"time\"\r\n\r\n    \"github.com/kataras/sheets\"\r\n)\r\n\r\nfunc main() {\r\n    ctx := context.TODO()\r\n    //                            or .Token(ctx, ...)\r\n    client := sheets.NewClient(sheets.ServiceAccount(ctx, \"client_secret.json\"))\r\n\r\n    var (\r\n        spreadsheetID := \"1Ku0YXrcy8Nqmji7ABS8AmLAyxP5duQIRwmaAJAqyMYY\"\r\n        dataRange := \"NamedRange or selectors like A1:E4 or *\"\r\n        records []struct{\r\n            Timestamp time.Time\r\n            Email     string\r\n            Username  string\r\n            IgnoredMe string `sheets:\"-\"`\r\n        }{}\r\n    )\r\n\r\n    // Fill the \"records\" slice from a spreadsheet of one or more data range.\r\n    err := client.ReadSpreadsheet(ctx, \u0026records, spreadsheetID, dataRange)\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n\r\n    // Update a spreadsheet on specific range.\r\n    updated, err := client.UpdateSpreadsheet(ctx, spreadsheetID, sheets.ValueRange{\r\n        Range: \"A2:Z\",\r\n        MajorDimension: sheets.Rows,\r\n        Values: [][]interface{}{\r\n            {\"updated record value: 1.1\", \"updated record value: 1.2\"},\r\n            {\"updated record value: 2.1\", \"updated record value: 2.2\"},\r\n        },\r\n    })\r\n\r\n    // Clears record values of a spreadsheet.\r\n    cleared, err := client.ClearSpreadsheet(ctx, spreadsheetID, \"A1:E5\")\r\n\r\n    // [...]\r\n}\r\n```\r\n\r\n## License\r\n\r\nThis software is licensed under the [MIT License](LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkataras%2Fsheets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkataras%2Fsheets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkataras%2Fsheets/lists"}