https://github.com/x2bool/xlite Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} x2bool / xlite Public * Notifications * Fork 4 * Star 190 License MIT license 190 stars 4 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights x2bool/xlite This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 0 tags Code Latest commit @x2bool x2bool Add LICENSE ... 7e0d103 Jun 25, 2022 Add LICENSE 7e0d103 Git stats * 3 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time src Initial Jun 25, 2022 .gitignore Initial Jun 25, 2022 Cargo.toml Initial Jun 25, 2022 LICENSE Add LICENSE Jun 25, 2022 README.md Add README Jun 25, 2022 View code XLite - query Excel (.xlsx, .xls) and Open Document spreadsheets (.ods) as SQLite virtual tables How to build How to use Limitations About README.md XLite - query Excel (.xlsx, .xls) and Open Document spreadsheets (.ods) as SQLite virtual tables XLite is a SQLite extension written in Rust. The main purpose of this library is to allow working with spreadsheets from SQLite exposing them as virtual tables. How to build cargo build --release This step will produce libxlite.so or libxlite.dylib depending on your operation system. How to use Assuming you have sqlite3 command line tools installed, libxlite library in your current directory and some spreadsheet file on your disk (this sample uses an .xslx file exported from Google Sheets) load extension: sqlite3 # will open SQLite CLI > .load libxlite This will load xlite module, now it can be used to create virtual tables. Creating a virtual table: CREATE VIRTUAL TABLE class_data USING xlite( FILENAME './path/to/example.xlsx', WORKSHEET 'Class Data', RANGE 'A2:F' ); Explanation: this statement will create a virtual table based on the .xlsx file and the worksheet named "Class Data". Optional RANGE parameter is used here to skip the first row in the table because in the sample spreadsheet it is used as a header. A2:F meaning is use columns from A to F but start from 2nd row. Querying: SELECT A, B, C, D, E, F from class_data; Columns are named according to their name (index) in the spreadsheet. SELECT COUNT(*), D FROM class_data GROUP BY D ORDER BY COUNT(*); Theoretically any operation supported by SQLite can be executed on the spreadsheet as long as it is supported by the virtual table mechanism. Dropping: DROP TABLE class_data; This statement will drop only the virtual table. Physical file won't be deleted. Limitations INSERT, UPDATE and DELETE statements are not supported right now. About This project is experimental, use at your own risk. The project is developed in my free time as a way to learn Rust and database systems. About No description, website, or topics provided. Resources Readme License MIT license Stars 190 stars Watchers 3 watching Forks 4 forks Releases No releases published Packages 0 No packages published Languages * Rust 90.5% * C 9.5% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.