Calling an Excel formula from a server-side Ruby web application

My client has an encoded function that takes 20 boolean values ​​and brings the result of integers.

They did it with Excel as a complex formula.

In a new ROR web application, would I rather rewrite everything in Ruby or somehow call an Excel formula?

Could I try to contact an instance on the server side of Excel or without an OpenOffice headset and contact it using JACOB or the OpenOffice API ?

+3
source share
2 answers

Excel. , , ss.xls, 1 A1, 2 B1 = A1 + B1 C1.

#gem install spreadsheet

require 'spreadsheet'    
book = Spreadsheet.open('ss.xls')
sheet = book.worksheet('Sheet1')
puts sheet.row(0)[2].value

value , Excel, 3.0

: : http://spreadsheet.rubyforge.org/GUIDE_txt.html

2: , Windows, ; win32ole, : http://www.ruby-doc.org/docs/ProgrammingRuby/html/win32.html

+2

, , Ruby , Excel/OpenOffice.

!

+1

All Articles