Please use either spring-roo or roo-gem
Questions tagged [roo]
104 questions
1
vote
0 answers
Rake task not able to send mail by requiring 'roo' Rails
I am writing a rake task for importing data from Csv, Xls and Xlsx for with Roo '1.9.1' ruby '1.8.7' and Rails '2.3.18'.
It works fine with all the data import and processing.
At the top of the file I have
require 'iconv'
require 'roo'
I am…

Madhusudhan
- 98
- 11
0
votes
1 answer
Extracting excel data after unzipping using rubyzip
I'm trying to get spreadsheet data from zipped .xlsx files. I'm using rubyzip to access the contents of the zipfile
Zip::File.open(file_path) do |zip_file|
zip_file.each do |entry|
*process entry*
end
end
My problem is that rubyzip gives…

sombersushi
- 3
- 1
0
votes
2 answers
Ruby on Rails - Roo gem | Issue opening active record attachment
Status:
I have a simple new Ruby On Rails App
I need to import some data from MS Excel in .xlsx format
I programmed an uploading to ActiveRecord as attachment via an attribute called 'excel'
I found a gem called Roo which should do the opening of…

Julian
- 27
- 6
0
votes
0 answers
ArgumentError: missing required workbook file
I am trying to read an Excel file in Rails using Roo.
file = Roo::Spreadsheet.open(path, extension: :xlsx)
On this line I'm getting this error ArgumentError: missing required workbook file from…

moon
- 21
- 2
- 3
0
votes
1 answer
Is there a way to save the cell changes in xlsm file in ruby
I have to change few cell values in .xlsm file in ruby, I used roo gem for the same. I am able to set the value for the specific cell however I am not able to save the changes. Below is the details on what I have tried so far,
workbook =…

Swapna
- 1
- 1
0
votes
0 answers
Validate uniqueness when updating without aborting the update process while importing CSV Rails
I have a database for managing staff in a large company. Each department is responsible for managing their own data. So I have Staff and Department models as shown below:
class Staff < ApplicationRecord
belongs_to :department
validates…

adamvanbart
- 67
- 1
- 10
0
votes
1 answer
Store hash extracted from xlsx in database in ruby using roo gem
Sorry for my bad english and for any stupid error, but I'm learning Ruby since few month.
I'm trying to read from a .xlsx file usign roo gem and after I would store my rows in the database, in a already existing model.
Here there is my Court…

Gigi
- 27
- 1
- 9
0
votes
0 answers
Rails map custom columns of excel file to db columns
I am using Roo to parse my CSV files for import. Everything works perfectly, but sometimes the end users will change the column headers of the excel file. For example, if the db column is first_name the users might change the header in the excel…

adamvanbart
- 67
- 1
- 10
0
votes
1 answer
ActiveRecord::AssociationTypeMismatch Rails CSV Import
I am using gem roo to import CSV data. It works smoothly, until the point where there is an association, and am hoping that roo can translate the string into the corresponding integer value in the association. In my case, I have a Staff model which…

adamvanbart
- 67
- 1
- 10
0
votes
0 answers
How to messaging with roo.bat
I have some problems with execute .bat file.
I used Spring Roo to generate web services from the command line and wanted to write a connector to the .bat file from java code.
When I launch my application, it hangs tight, (it seems the current…

Michael
- 11
- 5
0
votes
1 answer
How to fix srb irb update error using gem Roo? or any option how to skip roo from type checking?
I have data pipeline that needs to work with excel xls. I use gem roo for reading xlsx and Push to some API endpoint. I'm starting the project use gem sorbet. Execute srb init and it works. But when I add gem roo, it becomes error.
How can I tell…

udnpico
- 3
- 5
0
votes
1 answer
Rails 5 LoadError (cannot load such file -- roo)
I cannot seem to load roo and want to use it to import google spreadsheets
Im using rails 5.2.3, ruby 2.6.1p33
roo (2.8.2, 2.7.1)
Does anyone have an idea why this is happening?
When I try requiring roo in irb console, it seems to be working
class…

cancelledout
- 1
- 1
0
votes
1 answer
Rails ROO Gem Excel upload validate file extension
The code below checks and raises a Run Time error for unknown file formats.
def open_spreadsheet
case File.extname(file.original_filename)
when ".csv" then CSV.new(file.path)
when ".xls" then Roo::Excel.new(file.path, nil,…

Santosh Aryal
- 1,276
- 1
- 18
- 41
0
votes
1 answer
How to ignore duplicates when I import xlsx file?
I'm working on a project and I have to import some Phones to my website. Each phone have an IMEI and a ref_number.
However, some of those Phonesare already in the DB, which make the request longer and lead to an application error on Heroku.
Here's…

Enner31
- 193
- 1
- 13
0
votes
1 answer
Import CSV with Association
I have 2 models Order has_many line_items and line_item belongs_to order. The order has been created and the file import form is on the order show form. i am using roo gem for CSV import, but I do not have to if there is another solution. Each row…

DhatchXIX
- 437
- 1
- 3
- 17