I want to read an Excel file in a Rails application.
This is how I open my Excel file and read it.
doc = Spreadsheet.open('./try.xls', "r") sheet = doc.worksheet 0 sheet.each do |row| array_rows << row.to_a end
I have it as a rake task. When I try to read this file, it throws an error.
Ole::Storage::FormatError: OLE2 signature is invalid
What's happening? what should I do?
source share