Module: XLSXToHTML

Defined in:
lib/xlsx_to_html.rb,
lib/xlsx_to_html/helpers.rb,
lib/xlsx_to_html/version.rb,
lib/xlsx_to_html/renderer.rb,
lib/xlsx_to_html/exceptions.rb,
lib/xlsx_to_html/configuration.rb,
lib/xlsx_to_html/spreadsheet_parser.rb

Defined Under Namespace

Modules: Helpers Classes: Configuration, ExpectedDataNotFound, Renderer, SpreadsheetParser

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.configurationObject



13
14
15
# File 'lib/xlsx_to_html.rb', line 13

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



17
18
19
# File 'lib/xlsx_to_html.rb', line 17

def self.configure
  yield configuration
end

.convert(xlsx_path, expected_headers = [], key: nil) ⇒ Object



21
22
23
24
# File 'lib/xlsx_to_html.rb', line 21

def self.convert(xlsx_path, expected_headers = [], key: nil)
  data = XLSXToHTML::SpreadsheetParser.parse(xlsx_path, expected_headers)
  XLSXToHTML::Renderer.new(data).render(key: key)
end