{"id":15684100,"url":"https://github.com/64kramsystem/spreadbase","last_synced_at":"2025-05-07T15:07:40.925Z","repository":{"id":2920512,"uuid":"3930811","full_name":"64kramsystem/spreadbase","owner":"64kramsystem","description":"Ruby library for accessing (R/W) OpenOffice/LibreOffice spreadsheets (ods)... because Excel IS a database 😂","archived":false,"fork":false,"pushed_at":"2024-01-23T10:31:18.000Z","size":148,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T15:07:20.783Z","etag":null,"topics":["library","libreoffice","openoffice","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/64kramsystem.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":"2012-04-04T16:41:26.000Z","updated_at":"2022-07-22T10:30:06.000Z","dependencies_parsed_at":"2024-10-03T17:11:24.033Z","dependency_job_id":"77196399-442d-44b1-ab8e-8389a59fe752","html_url":"https://github.com/64kramsystem/spreadbase","commit_stats":null,"previous_names":["saveriomiroddi/spreadbase"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fspreadbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fspreadbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fspreadbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fspreadbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/64kramsystem","download_url":"https://codeload.github.com/64kramsystem/spreadbase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902614,"owners_count":21822261,"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":["library","libreoffice","openoffice","ruby","ruby-gem"],"created_at":"2024-10-03T17:11:21.237Z","updated_at":"2025-05-07T15:07:40.897Z","avatar_url":"https://github.com/64kramsystem.png","language":"Ruby","readme":"[![CI](https://github.com/saveriomiroddi/spreadbase/actions/workflows/ci.yml/badge.svg)](https://github.com/saveriomiroddi/spreadbase/actions/workflows/ci.yml)\n\nSpreadBase!!\n============\n\n... because Excel IS a database.\n\nStatus\n------\n\nThe library itself is stable, and can be regularly used.\n\nI plan to add features on request, but if nobody asks for them, I will update the project very infrequently.\n\nWhat is SpreadBase©?\n--------------------\n\nSpreadBase© is a set of APIs for programmatically accessing spreadsheets (currently, only OpenDocument 1.2).\n\nUsage\n-----\n\nInstall/require the gem:\n\n    gem install spreadbase\n\n    require 'spreadbase'\n\nCreate/open a document:\n\n    document = SpreadBase::Document.new( \"Today's menu.ods\" )\n\nAdd a table:\n\n    document.tables \u003c\u003c SpreadBase::Table.new(\n      'Transistors', [\n        [ 'Roasted 6502',                                 38.911 ],\n        [ '65000 with side dishes of Copper and Blitter', 512.0  ],\n      ]\n    )\n\nModify an existing table; can be done also directly on the array:\n\n    table = document.tables.first\n\n    table.insert_row( 0, [ 'Dish',                    'Price' ] )\n    table.insert_row( 2, [ '8080, with an 8-bit bus', 8       ] )\n\n    table.insert_column( 2, [ 'Availability', Date.today, Time.now + 42, 'Never!!' ] )\n\nAdd another (empty) table:\n\n    table_2 = SpreadBase::Table.new( 'Loud and annoying customers' )\n\n    document.tables \u003c\u003c table_2\n\nAppend a column:\n\n    table_2.append_column( [ 'Name' ] )\n\nAppend a row:\n\n    table_2.append_row( [ 'Fabrizio F.' ] )\n\nRead a column, or a range of columns:\n\n    table.column( 0 )\n\n    # [ 'Dish', 'Roasted 6502', '8080, with an 8-bit bus', '65000 with side dishes of Copper and Blitter' ]\n\n    table.column( 0 .. 1 )\n\n    # [ [ 'Dish',  'Roasted 6502', '8080, with an 8-bit bus', '65000 with side dishes of Copper and Blitter' ],\n    #   [ 'Price', 38.911,         8,                         512.0                                          ] ]\n\nRead a row, or a range of rows:\n\n    table.row( 1 )\n\n    # [ 'Roasted 6502', 38.911 ]\n\n    table.row( 1 .. 2 )\n\n    # [ [ 'Roasted 6502', 38.911 ], [ '8080, with an 8-bit bus', 8 ] ]\n\nRead a cell:\n\n    price_8080 = document.tables[ 0 ][ 1, 2 ]\n\nWhen a cell value is read from an existing file, the data type is directly converted to the closest ruby one.\n\nWrite to a cell:\n\n    document.tables[ 0 ][ 1, 2 ] = price_8080 + 0.080\n\nPrint a table:\n\n    puts document.tables[ 0 ].to_s( :with_headers =\u003e true )\n\n    +----------------------------------------------+--------+---------------------------+\n    | Dish                                         | Price  | Availability              |\n    +----------------------------------------------+--------+---------------------------+\n    | Roasted 6502                                 | 38.911 | 2012-04-21                |\n    | 8080, with an 8-bit bus                      | 8.08   | 2012-04-21 11:45:08 +0200 |\n    | 65000 with side dishes of Copper and Blitter | 512.0  | Never!!                   |\n    +----------------------------------------------+--------+---------------------------+\n\nPrint a document:\n\n    puts document.to_s( :with_headers =\u003e true )\n\n    Transistors:\n\n      +----------------------------------------------+--------+---------------------------+\n      | Dish                                         | Price  | Availability              |\n      +----------------------------------------------+--------+---------------------------+\n      | Roasted 6502                                 | 38.911 | 2012-04-21                |\n      | 8080, with an 8-bit bus                      | 8.08   | 2012-04-21 11:45:08 +0200 |\n      | 65000 with side dishes of Copper and Blitter | 512.0  | Never!!                   |\n      +----------------------------------------------+--------+---------------------------+\n\n    Loud and annoying customers:\n\n      +-------------+\n      | Name        |\n      +-------------+\n      | Fabrizio F. |\n      +-------------+\n\nSave the document:\n\n    document.save\n\nEnjoy many other APIs.\n\nNotes\n-----\n\n- Numbers are decoded to Fixnum or Float, depending on the existence of the fractional part.\n  Alternatively, numbers with a fractional part can be decoded as Bigdecimal, using the option:\n\n  `SpreadBase::Document.new( \"Random numbers für alle!.ods\", floats_as_bigdecimal: true )`\n\n- The gem is tested on all the supported Ruby versions (see [Build](https://github.com/saveriomiroddi/spreadbase/actions/workflows/ci.yml)), and used mainly on Linux.\n- The column widths are retained (decoding/encoding), but at the current version, they're not [officially] accessible via any API.\n\nCurrently unsupported features\n------------------------------\n\n- Styles; Date and and [Date]Times are formatted as, respectively, '%Y-%m-%d' and '%Y-%m-%d %H:%M:%S %z'\n- Percentage data type - they're handled using their float value (e.g. 50% = 0.5)\n\nRoadmap/Todo\n------------\n\nhttps://github.com/saveriomiroddi/spreadbase/wiki/Todo-%28roadmap%29\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F64kramsystem%2Fspreadbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F64kramsystem%2Fspreadbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F64kramsystem%2Fspreadbase/lists"}