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 6752287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:01:37+00:00 2026-05-26T13:01:37+00:00

I need to generate a report in .xls format, while trying to write the

  • 0

I need to generate a report in .xls format, while trying to write the data, i get the following error

~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:515:in `block in _write_sst': incompatible character encodings: ASCII-8BIT and US-ASCII (Encoding::CompatibilityError)
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:502:in `each'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:502:in `each_with_index'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:502:in `_write_sst'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:489:in `write_sst'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:439:in `write_from_scratch'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/excel/writer/workbook.rb:620:in `write_workbook'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/writer.rb:15:in `block in write'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/writer.rb:14:in `open'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/writer.rb:14:in `write'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/spreadsheet-0.6.4/lib/spreadsheet/workbook.rb:106:in `write'
    from lib/parse_fellow.rb:449:in `generate_match_report_fellow'
    from lib/parse_fellow.rb:547:in `<top (required)>'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/railties-3.0.7/lib/rails/commands/runner.rb:48:in `eval'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/railties-3.0.7/lib/rails/commands/runner.rb:48:in `<top (required)>'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/railties-3.0.7/lib/rails/commands.rb:39:in `require'
    from ~/.rvm/gems/ruby-1.9.2-p180@ash/gems/railties-3.0.7/lib/rails/commands.rb:39:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Line number 449 of parse_fellow.rb is

workbook.write("#{RAILS_ROOT}/lib/#{file}")

Before passing the value to my workbook object, i have tried encoding them to ASCII and UTF-8 using the following method, but none of them helped me

"my text content".force_encoding("ASCII-8BIT")

My development environment:

ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
Rails 3.0.7
spreadsheet (0.6.4)

I have no clue what is going wrong here and how to debug this issue. Any input would be greatly helpful to me.

  • 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-26T13:01:37+00:00Added an answer on May 26, 2026 at 1:01 pm

    Yet I don’t really know what the problem is. Unfortunately I could not find here someone else who has come through similar situation.

    The way i fixed this issue is by trying with different available version of the gem, finally it worked with following version.

    gem "spreadsheet", '0.6.5.9'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need to generate some financial report where the formatting is controlled by the data
Hello I need to generate a report which would include both data and a
I need some hibernate/SQL help, please. I'm trying to generate a report against an
I need to generate a report where the user can choose All Issues, Open
i will need to generate a report based on user input for every food
I've got a lot of mysql data that I need to generate reports from.
I need to generate a report/printout programmatically. My app currently uses FastReport to build
I am creating a Generate Report button for some data in my application. The
I'm stuck with in a place, where I want to generate a xls report,
I have a requirement where I need to generate a report about current software

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.