NAME

Spreadsheet::XLSX::Reader::LibXML::Row - XLSX Row data class

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 provides the basic storage and manipulation of row data (for worksheet files). It does not provide the final view of a given cell. The final view of the cell is collated with the role (Interface) Spreadsheet::XLSX::Reader::LibXML::Worksheet.

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

Modification of this module probably means a rework of the Worksheet level module Spreadsheet::XLSX::Reader::LibXML::XMLReader::WorksheetToRow. Review the attributes "_old_row_inst" in Spreadsheet::XLSX::Reader::LibXML::XMLReader::WorksheetToRow and "_new_row_inst" in Spreadsheet::XLSX::Reader::LibXML::XMLReader::WorksheetToRow for more details.

Attributes

Data passed to new when creating an instance. 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 Public Methods.

row_number

Definition: Stores the row number of the row data in count from 1

Default: none

Range: positive integers > 0

attribute methods Methods provided to adjust this attribute

get_row_number

Definition: return the attribute value

row_span

Definition: Stores an array ref of two integers representing the start and end columns in count from 1

Default: none

Range: [ 2 positive integers > 0 ]

attribute methods Methods provided to adjust this attribute

set_row_span

Definition: sets the attribute

has_row_span

Definition: predicate for the attribute

trait ['Array']

delegated methods - (curried)

get_row_start => [ 'get' => 0 ], # Get the first position

get_row_end => [ 'get' => 1 ], # Get the second position

row_last_value_column

Definition: Stores the column with a value in it in count from 1

Default: none

Range: positive integers > 0

attribute methods Methods provided to adjust this attribute

get_last_value_column

Definition: return the attribute value

row_formats

Definition: this is an open ended hashref with format values stored for the row

Default: none

Range: a hash ref

attribute methods Methods provided to adjust this attribute

set_row_formats

Definition: sets the attribute

trait ['Hash']

delegated methods

get_row_format => 'get'

row_value_cells

Definition: Stores an array ref of information about cells with values for that row (in order). The purpose of only storing the values is to allow for 'next_value' calls. The actual position of the cell column is stored in the cell hash and the attribute column_to_cell_translations.

Default: an ArrayRef[HashRef] with at least one column HashRef set

Range: ArrayRef[HashRef]

attribute methods Methods provided to adjust this attribute

get_row_value_cells

Definition: gets the stored attribute value

trait ['Array']

delegated methods

get_cell_position => 'get'

total_cell_positions => 'count'

column_to_cell_translations

Definition: only cells with values are stored but you may want to know if a cell has a value based on a column number or you may want to know where the contents of a cell containing values are base on a column number. This attribute stores that lookup table.

Default: an ArrayRef with at least one column position set

Range: ArrayRef

trait ['Array']

delegated methods

get_position_for_column => 'get'

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 the private method is listed here then replacement of this module either requires replacing them or rewriting all the associated connecting roles and classes. All methods here are assumed to be in count from 1 mode to since the role instances are meant to be managed in the background for the worksheet.

get_the_column( $column )

Definition: This returns the value stored at the desired column position. It also stores this position as the last column retrieved for any 'next_*' calls

Accepts: $column (integer)

Returns: a hashref of cell values at that column, undef for no values, or 'EOR' for positions past the end of the row.

get_the_next_value_position

Definition: This returns the next set of cell values or 'EOR' for positions past the end of the row. When a set of cell values is returned (not EOR) the new 'last' position is recorded.

Accepts: nothing

Returns: a hashref of key value pairs or 'EOR'

get_row_all

Definition: This is a way to get an array of hashrefs that are positioned correctly in count from zero locations for the row data. Just value cells can be returned with get_row_value_cells. For cells with no value between the value cells undef is stored. For cells past the last value even if they fall inside the row span no positions are created.

Accepts: nothing

Returns: an arrayref of hashrefs

SUPPORT

github Spreadsheet::XLSX::Reader::LibXML/issues

TODO

1. Nothing yet

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) 2014, 2015 by Jed Lund

DEPENDENCIES

version

perl 5.010

Moose

MooseX::StrictConstructor

MooseX::HasDefaults::RO

Clone - clone

Carp - confess

Type::Tiny - 1.000

SEE ALSO

Log::Shiras

All lines in this package that use Log::Shiras are commented out