Questions tagged [ruby-roo]

roo is a Ruby gem for reading spreadsheet files of Excel, OpenOffice and Google Docs.

roo is a Ruby gem for reading spreadsheets in the following formats:

  • Open-office spreadsheets (.ods)
  • Excel spreadsheets (.xls and .xlsx)
  • Google (online) spreadsheets

Useful links:

10 questions
6
votes
4 answers

Using Column headers to parse excel sheets using roo - Ruby

Can we use column headers to specify the column number from which we are parsing the excel sheet using roo gem? My current code is like this now: oo = Openoffice.new("simple_spreadsheet.ods") oo.default_sheet = oo.sheets.first (2..oo.last_row).each…
rubyprince
  • 17,559
  • 11
  • 64
  • 104
4
votes
1 answer

Is there any way to get Roo to accept StringIO objects in place of files?

I'm trying to write some unit tests which involves Roo reading Excel 2007 files. I have the Excel file in my unit test file as a hex string, which in turn is fed into a StringIO instance. I can't simply pass the StringIO object to…
Hubro
  • 56,214
  • 69
  • 228
  • 381
3
votes
2 answers

Access to merged cells using Ruby-Roo

According to example below: Value is stored only in A1, other cells return nil. How is possible to get the A1'a value from the others merged cells, or simply check range of the A1 cell?
zfChaos
  • 415
  • 4
  • 13
3
votes
2 answers

Ruby roo Excel.new

I have a question regarding the ruby roo library. There is a method for opening the Excel document Excel.new . How to close this document, having worked with it?
Markus
  • 3,547
  • 10
  • 39
  • 55
2
votes
1 answer

ruby roo puts column from parsing

I'm total newbie in programming...thanks in advance for all those who will answer me.. I'm trying to print the columns starting from a search. Actually my excel is composed like this: | | Header | Header | Header | Header | |Header|Server…
Mirko Spezie
  • 43
  • 1
  • 4
2
votes
1 answer

Unable to convert .xls to .csv using Roo

Goal for my code is to process all the .xls files in a directory and convert them all to .csv. This has worked in the past but after updating Ruby and Roo it is showing the error below. I am using Ruby 1.9.3-p362 and Roo 1.11.2. require…
analyticsPierce
  • 2,979
  • 9
  • 57
  • 81
1
vote
1 answer

Opening email attachment with roo

I need to manipulate xls files which are read from email attachments. Due to performance reasons I need to use the Roo gem. The problem here is passing the attachment to the Roo. Spreadsheet gem could read StringIO directly but Roo doesn't seem to…
Mika
  • 1,419
  • 18
  • 37
0
votes
1 answer

Roo cannot display spreadsheet, method unfound

I am using roo and would like to preview a spreadsheet by following the document says: <%= spreadsheet @rspreadsheet, ["Tabelle"] %> But the error says "undefined method `spreadsheet' " I don't know if i missed any gem. BTW, I've added the…
Frankel
  • 536
  • 2
  • 5
  • 19
0
votes
2 answers

roo gem in Ruby

I am using 'roo' gem for reading and writing the excel sheets. How can I get the last column of each row in excel sheet using 'roo' gem in Ruby Please give me some suggestion on this...
rekha_sri
  • 2,677
  • 1
  • 24
  • 27
-1
votes
1 answer

How to extract value based on the header OR how to extract headers value from ods file in Ruby?

Want to extract values under "Location" header. EDIT: —-following extracted from following comments. It originally appeared this was a web related thing, but no, the OP is dealing with a spreadsheet, not a web page.)—- This is an excel sheet and I…
Sachin
  • 11
  • 2