roo-rb / roo

Roo provides an interface to spreadsheets of several sorts.
MIT License
2.78k stars 503 forks source link

Missing error value: #ERROR! #558

Open aclarembeau opened 3 years ago

aclarembeau commented 3 years ago

Steps to reproduce

Read a sheet with a cell that contains =#error!

Issue

While using the Roo gem, we've remarked that some Excel sheet may contain cells with the #ERROR! value. We've been patching that with the following code:

module Roo
  class Excelx < Roo::Base
    ERROR_VALUES = %w(#N/A #REF! #NAME? #DIV/0! #NULL! #VALUE! #NUM! #ERROR!).to_set
  end
end

I think that would be good to add it to this official repo.

System configuration

Roo version:

Ruby version:

nicpillinger commented 2 years ago

+1 same problem here - #ERROR! just causes reading a sheet to bomb out with

invalid value for Integer(): "#ERROR!"