Sha256: 779680027253590678bee9139a3ad28ca5bb0c32ebf113edc3103db4d02e2e2f

Contents?: true

Size: 690 Bytes

Versions: 103

Compression:

Stored size: 690 Bytes

Contents

module Spreadsheet
  module Excel
##
# This class encapsulates Excel Error-Codes
class Error
  attr_reader :code
  ERROR_VALUES = {
    0x00 => '#NULL!',  # Intersection of two cell ranges is empty
    0x07 => '#DIV/0!', # Division by zero
    0x0F => '#VALUE!', # Wrong type of operand
    0x17 => '#REF!',   # Illegal or deleted cell reference
    0x1D => '#NAME?',  # Wrong function or range name
    0x24 => '#NUM!',   # Value range overflow
    0x2A => '#N/A!',   # Argument or function not available
  }
  def initialize code
    @code = code
  end
  ##
  # The String value Excel associates with an Error code
  def value
    ERROR_VALUES.fetch @code, '#UNKNOWN'
  end
end
  end
end

Version data entries

103 entries across 103 versions & 7 rubygems

Version Path
spreadsheet-0.6.5.4 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.5.3 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.5.2 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.5.1 lib/spreadsheet/excel/error.rb
ruby-spreadsheet-0.6.5 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.5.0 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.4.1 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.4 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.3 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.2 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.1 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.0 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.3 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.7 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.2 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.5 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.9 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.8 lib/spreadsheet/excel/error.rb
spreadsheet-0.6.1.4 lib/spreadsheet/excel/error.rb