Skip to content

apeiros/tabledata

Repository files navigation

README

Summary

Read tabular data from various formats, like Excel .xls, Excel .xlsx, CSV.

Installation

gem install tabledata

Usage

table1 = Tabledata.table file: 'some/excelfile.xls'
table2 = Tabledata.table header: %w[header1 header2], body: [['value1', 'value2']]
table3 = Tabledata.table data: [['header1', 'header2'], ['value1', 'value2']], accessors: [:cell1, :cell2]
table3.fetch_cell(1, :cell1) # => 'value1'
table3.row(1).cell1          # => 'value1'
table3[0][0]                 # => 'value1'

Description

Read tabular data from various formats.

Weak Dependencies

  • The 'roo' gem for .xls/.xlsx Excel file import
  • The 'spreadsheet' gem for .xls Excel file export
  • The 'prawn' gem for PDF export
  • The 'nokogiri' gem for HTML import

Links

License

You can use this code under the {file:LICENSE.txt BSD-2-Clause License}, free of charge. If you need a different license, please ask the author.

About

Process various table based formats, like Excel (.xls, .xlsx) and CSV, with a common API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published