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

  • Home
  • SEARCH
  • 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 6588393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:02:33+00:00 2026-05-25T17:02:33+00:00

I am building a ruby class/component to use in my Rails projects for creating

  • 0

I am building a ruby class/component to use in my Rails projects for creating reports/exports based on Excel .xlsx files. With the component, I can open a “template” .xlsx file, add data in rows to a sheet, save and then download the file to the user. It has been working well for several months now.

Now I need to take a pre-existing .xlsx file (think “form”), open it as a template, insert values in several of the cells, and then save and download to the user. For the most part, the process works. The one hitch is that one of the cells I am updating with data is within a range of cells that gets a SUM function applied to it. The problem: the SUM cell doesn’t have the correct sum in it.

I’ve checked the cell both in Excel upon download, and also the underlying xml – the cell and its data is numeric – not text. When I try to manually recalc the sheet – nada. I can update one of the other cells in the range that is getting SUM’d, and it magically starts working – the SUM cell shows the proper total.

I read a post earlier today that mentioned removing the element from the total field in order to signal to Excel when the spreadsheet is opened that it should recalc – nope.

I’d really like to open source this component once I get this further along; I think it would be a BIG help to the Ruby community. Thanks in advance for any help!

  • 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-25T17:02:33+00:00Added an answer on May 25, 2026 at 5:02 pm

    Sounds like you need to set the fullCalcOnLoad attribute of the calcPr element to true:

    <workbook> 
      <calcPr fullCalcOnLoad="1"/> 
    </workbook>
    

    This will cause the Excel document to perform the caluclations within all the workbooks when the file is opened.

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

Sidebar

Related Questions

I'm building Ruby on Rails 2.3.5 app. By default, Ruby on Rails doesn't provide
I am building a ruby on rails project. it is a portal. I have
I'm building an app in Ruby on Rails, and I'm including 3 of my
I'm building an iPhone application that talks to a Ruby on Rails backend. The
I'm thinking about building a login system for Ruby on Rails, much like this
I am building my first Ruby on Rails app which is going to be
I'm building a web application with Ruby on Rails which needs to be highly
I am interested in building web applications using Ruby on Rails. I surfed the
I am building an application using Ruby on Rails. I want to do something
I am a newbie in building Sencha Touch with Ruby on Rails. I would

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.