{"id":18259980,"url":"https://github.com/hungrybluedev/xlsx","last_synced_at":"2025-10-17T00:20:18.251Z","repository":{"id":219282477,"uuid":"718670157","full_name":"hungrybluedev/xlsx","owner":"hungrybluedev","description":"V library to add support for Microsoft Excel files.","archived":false,"fork":false,"pushed_at":"2024-02-21T18:41:48.000Z","size":899,"stargazers_count":18,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T18:36:24.411Z","etag":null,"topics":["vlang","xlsx"],"latest_commit_sha":null,"homepage":"","language":"V","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/hungrybluedev.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":"2023-11-14T15:04:43.000Z","updated_at":"2024-05-27T13:03:37.000Z","dependencies_parsed_at":"2024-11-05T11:13:24.240Z","dependency_job_id":null,"html_url":"https://github.com/hungrybluedev/xlsx","commit_stats":null,"previous_names":["hungrybluedev/xlsx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fxlsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fxlsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fxlsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fxlsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hungrybluedev","download_url":"https://codeload.github.com/hungrybluedev/xlsx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947825,"owners_count":21023058,"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":["vlang","xlsx"],"created_at":"2024-11-05T10:41:22.994Z","updated_at":"2025-10-17T00:20:13.232Z","avatar_url":"https://github.com/hungrybluedev.png","language":"V","funding_links":["https://github.com/sponsors/hungrybluedev"],"categories":["Libraries"],"sub_categories":["Text processing"],"readme":"# xlsx\n\n## Description\n\nA package in pure V for reading and writing (soon) Excel files in the XLSX format.\n\n## Roadmap\n\n- [x] Read XLSX files.\n- [ ] Write XLSX files.\n\n## Installation\n\n```bash\nv install https://github.com/hungrybluedev/xlsx\n```\n\n## Usage\n\n### Reading XLSX files\n\nTake the `data.xlsx` file from the `examples/01_marksheet` directory for this example.\n\n```v\nimport xlsx\n\nfn main() {\n\tworkbook := xlsx.Document.from_file('path/to/data.xlsx')!\n\tprintln('[info] Successfully loaded workbook with ${workbook.sheets.len} worksheets.')\n\n\tprintln('\\nAvailable sheets:')\n\t// sheets are stored as a map, so we can iterate over the keys.\n\tfor index, key in workbook.sheets.keys() {\n\t\tprintln('${index + 1}: \"${key}\"')\n\t}\n\n\t// Excel uses 1-based indexing for sheets.\n\tsheet1 := workbook.sheets[1]\n\n\t// Note that the Cell struct is able to the CellType.\n\t// So we can have an idea of what to expect before getting all\n\t// the data as a dataset with just string data.\n\tdataset := sheet1.get_all_data()!\n\n\tcount := dataset.row_count()\n\n\tprintln('\\n[info] Sheet 1 has ${count} rows.')\n\n\theaders := dataset.raw_data[0]\n\n\tprintln('\\nThe headers are:')\n\tfor index, header in headers {\n\t\tprintln('${index + 1}. ${header}')\n\t}\n\n\tprintln('\\nThe student names are:')\n\n\tfor index in 1 .. count {\n\t\trow := dataset.raw_data[index]\n\t\t// All data is stored as strings, so we need to convert it to the appropriate type.\n\t\troll := row[0].int()\n\t\tname := row[1] + ' ' + row[2]\n\t\tprintln('${roll:02d}. ${name}')\n\t}\n}\n```\n\nRemember to replace `'path/to/data.xlsx'` with the actual path to the file.\n\nAfter you are done, run the program:\n\n```bash\nv run marksheet.v\n```\n\nYou should see the following output:\n\n```plaintext\n[info] Successfully loaded workbook with 1 worksheets.\n\nAvailable sheets:\n1: \"1\"\n\n[info] Sheet 1 has 11 rows.\n\nThe headers are:\n1. Roll Number\n2. First Name\n3. Last Name\n4. Physics\n5. Chemistry\n6. Biology\n7. Mathematics\n8. Total\n9. Percentage\n\nThe student names are:\n01. Priya Patel\n02. Kwame Nkosi\n03. Mei Chen\n04. Aisha Adekunle\n05. Javed Khan\n06. Mei-Ling Wong\n07. Oluwafemi Adeyemi\n08. Yuki Takahashi\n09. Rashid Al-Mansoori\n10. Sanya Verma\n```\n\nTry running the example on other XLSX files to see how it works.\nModify the example to suit your needs.\n\n### Writing XLSX files\n\n_Coming soon!_\n\n## Get Involved\n\n- It is a good idea to have examples files ready for testing.\nIdeally, the test files should be as small as possible.\n\n- If it is a feature request, please provide a detailed description\nof the feature and how it should work.\n\n### On GitHub\n\n1. Create issues for bugs you find or features you want to see.\n2. Fork the repository and create pull requests for contributions.\n\n### On Discord\n\n1. Join the V Discord server: https://discord.gg/vlang\n2. Write in the `#xlsx` channel about your ideas and what you want to do.\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for more details.\n\n## Support\n\nIf you like this project, please consider supporting me on [GitHub Sponsors](https://github.com/sponsors/hungrybluedev).\n\n## Resources\n\n1. [Excel specifications and limits.](https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3)\n2. [Test Data for sample XLSX files.](https://freetestdata.com/document-files/xlsx/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungrybluedev%2Fxlsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhungrybluedev%2Fxlsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungrybluedev%2Fxlsx/lists"}