Module: Spreadsheet

Defined in:
lib/spreadsheet.rb,
lib/spreadsheet/row.rb,
lib/spreadsheet/font.rb,
lib/spreadsheet/link.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/workbook.rb,
lib/parseexcel/parseexcel.rb,
lib/spreadsheet/datatypes.rb,
lib/spreadsheet/encodings.rb,
lib/spreadsheet/excel/row.rb,
lib/spreadsheet/worksheet.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/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

Overview

Spreadsheet::Encoding – spreadheet – 07.09.2011 – [email protected] Spreadsheet::Encoding – spreadheet – 03.07.2009 – [email protected]

Defined Under Namespace

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

Constant Summary collapse

VERSION =

The version of Spreadsheet you are using.

'0.6.5.9'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.client_encodingObject

Returns the value of attribute client_encoding.



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

def client_encoding
  @client_encoding
end

Class Method Details

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

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



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

def open io_or_path, mode="rb+", &block
  if io_or_path.respond_to? :seek
    Excel::Workbook.open(io_or_path)
  elsif block
    File.open(io_or_path, mode) do |fh|
      block.call 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.



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

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