Method: Langchain::Processors::Xls#parse
- Defined in:
- lib/langchain/processors/xls.rb
#parse(data) ⇒ Array<Array<String>>
Parse the document and return the text
17 18 19 20 21 22 23 24 |
# File 'lib/langchain/processors/xls.rb', line 17 def parse(data) xls_file = Roo::Spreadsheet.open(data) xls_file.each_with_pagename.flat_map do |_, sheet| sheet.map do |row| row.map { |i| i.to_s.strip } end end end |