Sha256: 07680e24dd8e968a0c6c992699d35d349e276bf8dc8ca2bf5643107857c2f01d
Contents?: true
Size: 463 Bytes
Versions: 7
Compression:
Stored size: 463 Bytes
Contents
# frozen_string_literal: true module SimpleTextExtract module FormatExtractor class XlsX < Base def extract require "roo" spreadsheet = Roo::Spreadsheet.open(file, only_visible_sheets: true) text = [] spreadsheet.each_with_pagename do |name, sheet| text << name 1.upto(sheet.last_row.to_i) { |row| text << sheet.row(row) } end text.flatten.join(" ") end end end end
Version data entries
7 entries across 7 versions & 1 rubygems