{"id":13493275,"url":"https://github.com/libxls/libxls","last_synced_at":"2025-10-21T04:55:09.125Z","repository":{"id":39749100,"uuid":"121569413","full_name":"libxls/libxls","owner":"libxls","description":"Read binary Excel files from C/C++","archived":false,"fork":false,"pushed_at":"2025-08-06T14:06:40.000Z","size":1684,"stargazers_count":498,"open_issues_count":24,"forks_count":141,"subscribers_count":13,"default_branch":"dev","last_synced_at":"2025-09-27T18:57:50.236Z","etag":null,"topics":["excel","libxls","xls"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libxls.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-14T22:37:21.000Z","updated_at":"2025-09-23T12:18:50.000Z","dependencies_parsed_at":"2024-01-03T01:19:56.482Z","dependency_job_id":"598155dc-9b53-4778-92cf-be9fed8936a1","html_url":"https://github.com/libxls/libxls","commit_stats":{"total_commits":431,"total_committers":18,"mean_commits":"23.944444444444443","dds":0.4802784222737819,"last_synced_commit":"45abe77a5a531fe52f9b7d2fcc23e816dd5c14e3"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/libxls/libxls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libxls%2Flibxls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libxls%2Flibxls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libxls%2Flibxls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libxls%2Flibxls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libxls","download_url":"https://codeload.github.com/libxls/libxls/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libxls%2Flibxls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207203,"owners_count":26290616,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["excel","libxls","xls"],"created_at":"2024-07-31T19:01:13.780Z","updated_at":"2025-10-21T04:55:09.090Z","avatar_url":"https://github.com/libxls.png","language":"C","readme":"[![Build Status](https://github.com/libxls/libxls/workflows/build/badge.svg)](https://github.com/libxls/libxls/actions)\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libxls.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened\u0026can=1\u0026q=proj:libxls)\n\nlibxls - Read XLS files from C\n==\n\nThis is libxls, a C library for reading Excel files in the nasty old binary OLE\nformat, plus a command-line tool for converting XLS to CSV (named, appropriately\nenough, `xls2csv`).\n\nAfter several years of neglect, libxls is under new management as of the 1.5.x\nseries. Head over to [releases](https://github.com/libxls/libxls/releases) to\nget the latest stable version of libxls 1.5, which fixes *many* security\nvulnerabilities found in libxls 1.4 and earlier.\n\nLibxls 1.5 also includes new APIs for parsing files stored in memory buffers,\nand returns errors instead of exiting upon encountering malformed input. If you\nfind a bug, please file it on the [GitHub issue tracker](https://github.com/libxls/libxls/issues).\n\nChanges to libxls since 1.4:\n\n* Hosted on GitHub (hooray!)\n* New in-memory parsing API (see `xls_open_buffer`)\n* Internals rewritten to return errors instead of exiting\n* Heavily fuzz-tested with clang's libFuzzer, fixing many memory leaks and CVEs\n* Improved compatibility with C++\n* Continuous integration tests on Mac, Linux, and Windows\n* Lots of other small fixes, see the commit history\n\nThe [C API](include/xls.h) is pretty simple, this will get you started:\n\n```c\nxls_error_t error = LIBXLS_OK;\nxlsWorkBook *wb = xls_open_file(\"/path/to/finances.xls\", \"UTF-8\", \u0026error);\nif (wb == NULL) {\n    printf(\"Error reading file: %s\\n\", xls_getError(error));\n    exit(1);\n}\nfor (int i=0; i\u003cwb-\u003esheets.count; i++) { // sheets\n    xlsWorkSheet *work_sheet = xls_getWorkSheet(work_book, i);\n    error = xls_parseWorkSheet(work_sheet);\n    for (int j=0; j\u003c=work_sheet-\u003erows.lastrow; j++) { // rows\n        xlsRow *row = xls_row(work_sheet, j);\n        for (int k=0; k\u003c=work_sheet-\u003erows.lastcol; k++) { // columns\n            xlsCell *cell = \u0026row-\u003ecells.cell[k];\n            // do something with cell\n            if (cell-\u003eid == XLS_RECORD_BLANK) {\n                // do something with a blank cell\n            } else if (cell-\u003eid == XLS_RECORD_NUMBER) {\n               // use cell-\u003ed, a double-precision number\n            } else if (cell-\u003eid == XLS_RECORD_FORMULA) {\n                if (strcmp(cell-\u003estr, \"bool\") == 0) {\n                    // its boolean, and test cell-\u003ed \u003e 0.0 for true\n                } else if (strcmp(cell-\u003estr, \"error\") == 0) {\n                    // formula is in error\n                } else {\n                    // cell-\u003estr is valid as the result of a string formula.\n                }\n            } else if (cell-\u003estr != NULL) {\n                // cell-\u003estr contains a string value\n            }\n        }\n    }\n    xls_close_WS(work_sheet);\n}\nxls_close_WB(wb);\n```\n\nThe library also includes a CLI tool for converting Excel files to CSV:\n\n    ./xls2csv /path/to/file.xls\n\nThe man page for `xls2csv` has more details.\n\nLibxls should run fine on both little-endian and big-endian systems, but if not\nplease open an [issue](https://github.com/libxls/libxls/issues/new).\n\nIf you want to hack on the source, you should first familiarize yourself with\nthe [Microsoft Excel File Format](http://sc.openoffice.org/excelfileformat.pdf)\nas well as [Compound Document file\nformat](http://sc.openoffice.org/compdocfileformat.pdf) (documentation provided\nby the nice folks at OpenOffice.org).\n\nInstallation\n---\n\nIf you want a stable version, check out the\n[Releases](https://github.com/libxls/libxls/releases) section, which has copies of everything\nyou'll find in [Sourceforge](https://sourceforge.net/projects/libxls/files/),\nand download version 1.5.0 or later.\n\nFor full instructions see [INSTALL](INSTALL), or here's the tl;dr:\n\nTo install a stable release:\n\n```\n./configure\nmake\nmake install\n```\n\nIf you've cloned the git repository, you'll need to run this first:\n\n```\n./autogen.sh\n```\n\nThat will generate all the supporting files. It assumes autotools is already\ninstalled on the system (and also expects Autoconf Archive to be present).\n\nLanguage bindings\n---\n\nIf C is not your cup of tea, you can make use of libxls in several other languages, including:\n\n* [Haskell](https://hackage.haskell.org/package/xls)\n* [R](https://readxl.tidyverse.org)\n* [Rust](https://github.com/evanmiller/rust-xls)\n* [Go](https://github.com/godzie44/go-xls)\n* [Crystal](https://github.com/mdwagner/xls.cr)\n","funding_links":[],"categories":["Office Open XML","C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibxls%2Flibxls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibxls%2Flibxls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibxls%2Flibxls/lists"}