Is there a RUBY Framework for LO?

Anybody know of a RUBY framework for LO?

I.e. the VB or C++ or or or script that can be used to call/start a ruby console (IRB, rails, sketchup, etc)

I guess for that matter, anybody know of RUBY framework that could digest a LO document?

Actually I would be more interested in some sort of framework where LO could call a ruby program

@vojo, Why do you want to call a ruby program from within a LO document?

https://rubygems.org/gems/rods

“a Ruby-Library for batch-processing of OpenDocument-Spreadsheets (therefore compatible with the well known GUI-applications LibreOffice and OpenOffice).”

http://www.rubyreports.org/

This one seems to be a framework for using Ruby to create ODF docs.


Actually I would be more interested in some sort of framework where LO could call a ruby program

I don’t know how one would do that, and I’m not sure why LO would do that. Do you have a specific use case you could share?

I am writing

It allows manipulating spreadsheets with Ruby. Read, modify, write or create new OpenDocument Spreadsheet files from ruby code. I humbly think it is far better then rods and I am actively developing it. I would be grateful for any feedback on this.

Examples of usage

require 'rspreadsheet'
book = Rspreadsheet.open('spreadsheet.ods')
sheet = book.worksheets[1]


# get value of a cell B5 (there are more ways to do this)
sheet.B5                       # => 'cell value'
sheet[5,2]                     # => 'cell value'
sheet.rows(5).cells(2).value   # => 'cell value'

# set value of a cell B5
sheet.F5 = 'text'
sheet[5,2] = 7
sheet.cells(5,2).value = 1.78

# working with cell format
sheet.cells(5,2).format.bold = true
sheet.cells(5,2).format.background = '#FF0000'

# calculating sum of cells in row
sheet.rows(5).cellvalues.sum
sheet.rows(5).cells.sum{ |cell| cell.value }

# iterating over list of people and displaying the data

total = 0
sheet.rows.each do |row|
  puts "Sponsor #{row[1]} with email #{row(2)} has donated #{row(3)} USD."
  total += row[3]
end
puts "Totally fundraised #{total} USD"

# saving file
book.save
book.save('different_filename.ods')