The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Spreadsheet::Reader::ExcelXML::XMLReader::NamedWorksheet - Flat XML Excel worksheet interpreter

SYNOPSIS

See t\Spreadsheet\Reader\ExcelXML\XMLReader\06-named_worksheet.t

DESCRIPTION

This documentation is written to explain ways to use this module when writing your own excel parser. To use the general package for excel parsing out of the box please review the documentation for Workbooks, Worksheets, and Cells

This module incrementally adds functionality to the base class Spreadsheet::Reader::ExcelXML::XMLReader. The goal is to parse individual worksheet files (not chartsheets) from the flat XML Excel file format (.xml) into perl objects The primary purpose of this role is to normalize functions used by Spreadsheet::Reader::ExcelXML::WorksheetToRow where other roles could be used to normalize other formats. It does not provide a way to read chartsheets.

All positions (row and column places and integers) at this level are stored and returned in count from one mode!

To replace this part in the package look in the raw code of Spreadsheet::Reader::ExcelXML::Workbook and adjust the 'worksheet_interface' key of the $parser_modules variable.

requires

This module is a role and as such only adds incremental methods and attributes to some base class. In order to use this role some base object methods are required. The requirments are listed below with links to the default provider.

Attributes

Data passed to new when creating an instance. This list only contains public attributes incrementally provided by this role. For access to the values in these attributes see the listed 'attribute methods'. For general information on attributes see Moose::Manual::Attributes. For ways to manage the instance when opened see the Methods.

is_hidden

    Definition: This data is collected at the worksheet level for this file type. It indicates if the sheet is human visible. Since the data is collected during the implementation of load_unique_bits it will always overwrite what is passed from the Workbook.

    Range: (1|0)

    attribute methods Methods provided to adjust this attribute

      is_sheet_hidden

        Definition: return the attribute value

_sheet_min_col

    Definition: This is the minimum column in the sheet with data or formatting. For this module it is pulled from the xml file at worksheet/dimension:ref = "upperleft:lowerright"

    Range: an integer

    attribute methods Methods provided to adjust this attribute

      _min_col

        Definition: returns the attribute value

      has_min_col

        Definition: attribute predicate

_sheet_min_row

    Definition: This is the minimum row in the sheet with data or formatting. For this module it is pulled from the xml file at worksheet/dimension:ref = "upperleft:lowerright"

    Range: an integer

    attribute methods Methods provided to adjust this attribute

      _set_min_row

        Definition: sets the attribute value

      _min_row

        Definition: returns the attribute value

      has_min_row

        Definition: attribute predicate

_sheet_max_col

    Definition: This is the maximum column in the sheet with data or formatting. For this module it is pulled from the xml file at worksheet/dimension/ref = "upperleft:lowerright"

    Range: an integer

    attribute methods Methods provided to adjust this attribute

      _set_max_col

        Definition: sets the attribute value

      _max_col

        Definition: returns the attribute value

      has_max_col

        Definition: attribute predicate

_sheet_max_row

    Definition: This is the maximum row in the sheet with data or formatting. For this module it is pulled from the xml file at worksheet/dimension:ref = "upperleft:lowerright"

    Range: an integer

    attribute methods Methods provided to adjust this attribute

      _set_max_row

        Definition: sets the attribute value

      _max_row

        Definition: returns the attribute value

      has_max_row

        Definition: attribute predicate

Methods

These are the methods provided by this class for use within the package but are not intended to be used by the end user. Other private methods not listed here are used in the module but not used by the package. If a method is listed here then replacement of this module either requires replacing the method or rewriting all the associated connecting roles and classes.

load_unique_bits

advance_row_position( $increment )

    Definition: As an XML data structure each worksheet has three levels of information. The column data is stored separately in the file and just referenced. The row data encases all the cell data for that row. Each cell contains modifiers to row and column settings. The column data is read during the 'load_unique_bits' method. The cell specific data is not completed here. This method will advance to the next recorded row position in the XML file. Not to be confused with the next row number. If you want to advance to the 'next' position more than one time then you can provide a value for $increment.

    Accepts: a positive integer $increment (defaults to 1 if no value passed)

    Returns: The attribute ref of the top row node

build_row_data

get_custom_column_data( $column )

    Definition: Returns any collected custom column information for the indicated $column.

    Accepts: a positive integer $column in count from 1 context

    Returns: a hash ref of custom column settings

get_custom_row_data( $row )

    Definition: Returns any collected custom row information for the indicated $row.

    Accepts: a positive integer $row in count from 1 context

    Returns: a hash ref of custom row settings

get_merge_map

    Definition: This returns the full merge map with merge ranges stored in each position for the range of known rows and columns.

    Accepts: nothing

    Returns: an array ref of array refs where the top level array represents rows stored in count from 1 context and the second level array ref are the columns stored in count from 1 context. (The first position for each will therefor be dead space)

SUPPORT

TODO

AUTHOR

Jed Lund
jandrew@cpan.org

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

This software is copyrighted (c) 2016 by Jed Lund

DEPENDENCIES

SEE ALSO