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/format.rb,
lib/spreadsheet/writer.rb,
lib/spreadsheet/formula.rb,
lib/spreadsheet/helpers.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, 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.

'0.9.4'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.client_encodingObject

Returns the value of attribute client_encoding.



56
57
58
# File 'lib/spreadsheet.rb', line 56

def client_encoding
  @client_encoding
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.



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

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.



76
77
78
# File 'lib/spreadsheet.rb', line 76

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