Module: Spreadsheet

Defined in:
lib/spreadsheet.rb,
lib/spreadsheet/row.rb,
lib/spreadsheet/font.rb,
lib/spreadsheet/link.rb,
lib/spreadsheet/note.rb,
lib/parseexcel/parser.rb,
lib/spreadsheet/excel.rb,
lib/spreadsheet/column.rb,
lib/spreadsheet/errors.rb,
lib/spreadsheet/format.rb,
lib/spreadsheet/writer.rb,
lib/spreadsheet/formula.rb,
lib/spreadsheet/helpers.rb,
lib/spreadsheet/version.rb,
lib/spreadsheet/workbook.rb,
lib/parseexcel/parseexcel.rb,
lib/spreadsheet/datatypes.rb,
lib/spreadsheet/encodings.rb,
lib/spreadsheet/excel/rgb.rb,
lib/spreadsheet/excel/row.rb,
lib/spreadsheet/worksheet.rb,
lib/spreadsheet/noteObject.rb,
lib/spreadsheet/excel/error.rb,
lib/spreadsheet/excel/offset.rb,
lib/spreadsheet/excel/reader.rb,
lib/spreadsheet/compatibility.rb,
lib/spreadsheet/excel/workbook.rb,
lib/spreadsheet/excel/internals.rb,
lib/spreadsheet/excel/sst_entry.rb,
lib/spreadsheet/excel/worksheet.rb,
lib/spreadsheet/excel/reader/biff5.rb,
lib/spreadsheet/excel/reader/biff8.rb,
lib/spreadsheet/excel/writer/biff8.rb,
lib/spreadsheet/excel/password_hash.rb,
lib/spreadsheet/excel/writer/format.rb,
lib/spreadsheet/excel/internals/biff5.rb,
lib/spreadsheet/excel/internals/biff8.rb,
lib/spreadsheet/excel/writer/workbook.rb,
lib/spreadsheet/excel/writer/worksheet.rb,
lib/spreadsheet/excel/writer/n_worksheet.rb

Overview

Future directions may include:

- support for mapping RGB values to "best fit" palette values

by Dan Caugherty github.com/dancaugherty/spreadsheet/compare/master…rgb

Defined Under Namespace

Modules: Compatibility, Datatypes, Encodings, Errors, Excel, Helpers, ParseExcel Classes: Column, Font, Format, Formula, Link, Note, NoteObject, Row, Workbook, Worksheet, Writer

Constant Summary collapse

VERSION =

The version of Spreadsheet you are using.

'1.3.3'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.client_encodingObject

Returns the value of attribute client_encoding.



58
59
60
# File 'lib/spreadsheet.rb', line 58

def client_encoding
  @client_encoding
end

.enc_ignoreObject

Returns the value of attribute enc_ignore.



58
59
60
# File 'lib/spreadsheet.rb', line 58

def enc_ignore
  @enc_ignore
end

.enc_translitObject

Returns the value of attribute enc_translit.



58
59
60
# File 'lib/spreadsheet.rb', line 58

def enc_translit
  @enc_translit
end

Class Method Details

.open(io_or_path, mode = "rb+") ⇒ Object

Parses a Spreadsheet Document and returns a Workbook object. At present, only Excel-Documents can be read.



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/spreadsheet.rb', line 63

def open io_or_path, mode="rb+"
  if io_or_path.respond_to? :seek
    Excel::Workbook.open(io_or_path)
  elsif block_given?
    File.open(io_or_path, mode) do |fh|
      yield open(fh)
    end
  else
    open File.open(io_or_path, mode)
  end
end

.writer(io_or_path, type = Excel) ⇒ Object

Returns a Writer object for the specified path. At present, only the Excel-Writer is available.



78
79
80
# File 'lib/spreadsheet.rb', line 78

def writer io_or_path, type=Excel
  Excel::Writer::Workbook.new io_or_path
end