class

XLSX::Document

Inherits Reference < Object

An XLSX document containing one or more worksheets.

Constructors

new(sheets : Array(Sheet))
Source
open(path : String) : self

Opens an XLSX document from a file path.

Source
open(io : IO) : self

Opens an XLSX document from an IO source.

Source

Instance methods

[](name : String) : Sheet

Returns the sheet with the given name. Raises KeyError if not found.

Source
[](index : Int32) : Sheet

Returns the sheet at the given 0-based index.

Source
each

Yields each sheet in document order.

Source
sheet_names

Returns all sheet names in document order.

Source
size

Returns the number of sheets.

Source