{"repo":"tafia/calamine","free":true,"listed":false,"github":"https://github.com/tafia/calamine","clone":"git clone https://github.com/tafia/calamine.git","description":"A pure Rust Excel/OpenDocument SpreadSheets file reader: rust on metal sheets","language":"Rust","stars":2403,"topics":["rust","excel","opendocument-spreadsheet","parser","vba","serde","deserializer"],"license":"MIT","category":"dev-tools","readme_excerpt":"calamine An Excel/OpenDocument Spreadsheets file reader/deserializer, in pure Rust. Documentation Description calamine is a pure Rust library to read and deserialize any spreadsheet file: - excel like ( xls , xlsx , xlsm , xlsb , xla , xlam ) - opendocument spreadsheets ( ods ) As long as your files are simple enough , this library should just work. Examples Serde deserialization It is as simple as: Calamine provides helper functions to deal with invalid type values. For instance, to deserialize a column which should contain floats but may also contain invalid values (i.e. strings), you can use the deserialize as f64 or none helper function with Serde's deserialize with field attribute: The deserialize as f64 or none function discards all invalid values. If instead you would like to return them as String s, you can use the similar deserialize as f64 or string function. Reader: Simple Reader: With header row Note that xlsx and xlsb files support lazy loading, so specifying a header row takes effect immediately when reading a sheet range. In contrast, for xls and ods files, all sheets are loaded at once when opening the workbook with default settings. As a result, setting the header row only applies afterward and does not provide any performance benefits. Reader: More complex Let's assume - the file type (xls, xlsx ...) cannot be known at static time - we need to get all data from the workbook - we need to parse the vba - we need to see the defined names - and the formula! Add ","default_branch":null,"files":null,"tree":[],"storefront":"/r/tafia","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tafia/calamine/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}