Questions tagged [roo-gem]

Roo is a ruby gem which provides an interface to Open Office, Excel, and Google Spreadsheets.

Roo is a ruby gem which provides an interface to Open Office, Excel, and Google Spreadsheets.

For more information see the gem documentation page and the github project page

69 questions
2
votes
2 answers

Getting Errno::ENOENT: No such file or directory @ rb_sysopen When trying to open remote file url in Roo gem(Ruby on rails)

I have stored an file in AWS s3 storage when trying to open an file to import data using roo gem, It raising following error Errno::ENOENT: No such file or directory @ rb_sysopen def self.import(file, user_id) imported_file =…
raj_acharya
  • 665
  • 5
  • 17
2
votes
1 answer

Roo - Finding cell by content

Is there a way when using roo to get the coordinates of a cell (or just the row) containing a predefined value? For instance, having cell A,3 with content "HERE", I need, passing "HERE" to get (A,3) or just 3. Thanks.
Sig
  • 5,476
  • 10
  • 49
  • 89
2
votes
1 answer

How to save a modified excel file using Roo::Excel?

I opened an existing excel file using Roo::Excel. I was also able to modify the content. The problem is I don't know how to save it. Is Roo:Excel only meant for reading? If not, how do I save the changes?
Catherine
  • 95
  • 1
  • 10
2
votes
1 answer

NoMethodError: undefined method `generate' for Roo::CSV:Class

I try to made a scheduled daily csv mail. I put inside my Importer class: " include Roo" then I put 2 functions: def self.daily_mail Company.find_each do |c| export_to_csv(c) end end def self.export_to_csv(company) @opportunities =…
miss_M
  • 129
  • 2
  • 11
2
votes
0 answers

undefined method `[]' for nil:NilClass while importing csv file in rails

I have an application on which I want to provide the feature to import the records from CSV and Excel file formats. I am using roo gem for it, but at the time of importing it gives the error "undefined method `[]' for nil:NilClass". Here is the code…
Nitesh Mishra
  • 570
  • 1
  • 4
  • 18
2
votes
2 answers

How to put arrays from Roo excel sheet in two dimensional array

I am using the roo-gem in ruby to get excel sheet cell values. I have a file 'ruby.rb' with: require 'spreadsheet' require 'roo' xls = Roo::Spreadsheet.open('test_work.xls') xls.each do |row| p row end my output in the terminal when I run ruby…
Mike
  • 31
  • 6
2
votes
0 answers

How to fix the error in 'spreadsheet' gem (Unknown Codepage 0x906c)?

I need to get information from the xls file for that was involved gem 'roo'. When I try to read a file, I get an error. Please help fix this error! My code: require 'roo' require 'spreadsheet' require 'open-uri' x =…
henb
  • 577
  • 1
  • 4
  • 19
1
vote
1 answer

Upload excel data using a combination of two columns?

I have an excel sheet which has the format shown below: Members can have multiple entries in the corresponding members table. When uploading data from the excel template, I would like to find_by pin as well as end_date so that I update the specific…
adamvanbart
  • 67
  • 1
  • 10
1
vote
0 answers

Temp File Corruption while loading .xlsx file on rails test environment

I'm creating feature tests (using Rspec/Capybara), and run into this problem on a feature that opens and reads a .xlsx file. Failure/Error: when ".xlsx" then Roo::Excelx.new(file.path, nil, :ignore) else raise "Tipo de arquivo desconhecido:…
Zavitoski
  • 403
  • 5
  • 11
1
vote
0 answers

how to get plain text from .xlsx using roo

When I open .xlsx files using roo, special characters in cells are converted to HTML tags. ex) hello world -> \hello\world\\ how I can avoid this? I want to get plain texts like "hello world". When I open .xls files using roo-xls, special…
akira
  • 11
  • 2
1
vote
1 answer

Heroku Scheduler with Custom Intervals using "simple_scheduler"

I want run an scheduler at every saturday at 11.45pm, But if use whenever gem it will not support in heroku, How can we write Heroku Scheduler with Custom Intervals? Answer: Simple Scheduler is a scheduling add-on that is designed to be used with…
raj_acharya
  • 665
  • 5
  • 17
1
vote
0 answers

import records using the gem roo

I am trying to import records to the database using the gem roo using excel files, it works pretty well making use of this tutorial, I am importing nested records belonging to the relation "has_one" when importing again the excel me updates the…
jeff
  • 367
  • 4
  • 19
1
vote
2 answers

Getting -nil- values for ActiveRecord attributes in Rails database when parsing spreadsheet using roo-gem

So I am trying to build a feature within my application that will allow a User to upload a spreadsheet file filled with new products. I installed the Roo gem. I created a link for the User to download a templated Google Spreadsheet to use to upload…
1
vote
1 answer

Rails - Unable to use gem in controller

I am attempting to use the Roo gem to parse a spreadsheet file in my Rails controller. I have added the appropriate line to my Gemfile and ran the bundle command. Here is the line in my controller where everything breaks: xlsx =…
Troy Carlson
  • 2,965
  • 19
  • 26
1
vote
2 answers

storing data from excel sheet to db in ror

Suppose I have a excel sheet that contains data to be stored in the db.I used roo gem and inserted the data from excel sheet successfully.Now I am trying to validate. Assume my excel sheet as: s.no name age 1 abc 12 2 def qwer 3…
Harshini
  • 75
  • 1
  • 1
  • 11