Class: BerkeleyLibrary::TIND::Export::ODSExporter

Inherits:
Exporter
  • Object
show all
Defined in:
lib/berkeley_library/tind/export/ods_exporter.rb

Overview

Exporter for OpenOffice/LibreOffice format

Constant Summary collapse

LOCKED_CELL_COLOR =
'#c0362c'.freeze
EIGHTH =

Round column widths up to nearest quarter inch

'1/8'.to_r
MAX_COLUMN_WIDTH_INCHES =

Max column width before wrapping

3.0

Instance Attribute Summary

Attributes inherited from Exporter

#collection, #exportable_only

Instance Method Summary collapse

Methods inherited from Exporter

#any_results?, #export_table, #initialize, #respond_to?

Constructor Details

This class inherits a constructor from BerkeleyLibrary::TIND::Export::Exporter

Instance Method Details

#exportString #export(out) ⇒ Object #export(path) ⇒ Object

Exports ExportBase#collection as an OpenOffice/LibreOffice spreadsheet

Overloads:

  • #exportString

    Exports to a new string.

    Returns:

    • (String)

      a binary string containing the spreadsheet data.

  • #export(out) ⇒ Object

    Exports to the specified output stream. @return[void]

    Parameters:

    • out (IO)

      the output stream

  • #export(path) ⇒ Object

    Exports to the specified file. If path denotes a directory, the spreadsheet will be written as exploded, pretty-printed XML. @return[void]

    Parameters:

    • path (String, Pathname)

      the path to the output file or directory

    See Also:



34
35
36
37
# File 'lib/berkeley_library/tind/export/ods_exporter.rb', line 34

def export(out = nil)
  populate_spreadsheet!
  spreadsheet.write_to(out)
end