Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6373611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:23:01+00:00 2026-05-25T01:23:01+00:00

My customer has a coded a function that takes 20 boolean values and comes

  • 0

My customer has a coded a function that takes 20 boolean values and comes up with an integer result.

They did it with Excel, as a complex formula.

In a new ROR web application, am I better off recoding the whole thing in Ruby, or somehow calling the Excel formula?

I could try to contact a server-side instance of Excel or headless OpenOffice and communicate with it using JACOB or the OpenOffice API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:23:02+00:00Added an answer on May 25, 2026 at 1:23 am

    You can use the spreadsheet gem to read from the Excel file. Try the following code, using a sample file in the same directory called ss.xls which has 1 in A1, 2 in B1, and =A1+B1 in C1.

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

    The value call returns the last value for the cell that was calculated by Excel, with the above example it will output 3.0

    Edit: Read more about the gem here: http://spreadsheet.rubyforge.org/GUIDE_txt.html

    Edit 2: Of course, if you happen to be on Windows you will not need a gem; you just can use the win32ole library as described here: http://www.ruby-doc.org/docs/ProgrammingRuby/html/win32.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an application that is used by several different customers. Each customer has
Problem: Customer X has requested that pages using XML DataBinding and Databound tables in
I have a customer that has set up a full backup of the database
A customer has asked this morning why he isn't showing up at all in
Good Afternoon, A customer has provided me with a spreadsheet file his team uses
I have a basic Customer/Order/OrderItem/Product object graph. Customer has Many Orders, Order has Many
I have 3 abstract classes (Customer, Tender, Site). For Customer has inherited class such
I have a list of Customers. Each customer has an address and some customers
So I am working on a java application, and the customer has requested the
Background: Customer X has a CCK-based Content Type (vendorxxentry) and is using Views2 to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.