Xls::Spreadsheet
Inherits Xls::InspectableMethods < Reference < Object
A Xls::Spreadsheet represents the document and contains metadata.
Constructors
Class methods
Toggles debug mode for libxls
value controls different types of debugging information.
Yields a new Xls::Spreadsheet by providing a filepath or string or IO
Calls #validate! on the newly created Xls::Spreadsheet.
Always invokes #close after yielding.
Creates a new Xls::Spreadsheet by opening a file
charset can be an encoding other than UTF-8.
Throws Xls::FileNotFound if the filepath cannot be found.
Instance methods
Closes the Xls::Spreadsheet and any Xls::Worksheet's
Once a Xls::Spreadsheet is closed, it cannot be reopened in the same instance.
You must create a new Xls::Spreadsheet instance to reopen it.
Returns the text encoding used to write byte strings, stored as MS Windows code page identifier
For more information see https://en.wikipedia.org/wiki/Character_encoding.
Returns information about a used font, including character formatting
All FONT records occur together in a sequential list. Other records referencing a FONT record contain an index into this list.
The font with index 4 is omitted in all BIFF versions.
This means the first four fonts have zero-based indexes, and the fifth font and all following fonts are refereced with one-based indexes.
Use Xls::Spreadsheet::Font#real_index to access this particular sequence.
Returns information about a number format
All FORMAT records occur together in a sequential list.
Validates the spreadsheet
Can only be called once.
Throws Xls::Error if spreadsheet is invalid.
Throws Xls::WorkbookParserException if spreadsheet failed to parse.
Returns worksheets for the spreadsheet
Throws Xls::WorksheetParserException if a worksheet failed to parse.