NAME

Spreadsheet::XLSX::Reader::LibXML::UtilFunctions - A useful Role for number mashing

DESCRIPTION

SYNOPSIS

#!perl
package MyPackage;

###########################
# SYNOPSIS Screen Output
# 01: (2, 2)
###########################

Attributes

Attiributes are ways to change the instances behaviour and can be set as arguments to ->new

count_from_zero

    Definition: A boolean attribute that determines if the numerical output of parse_column_row provides a response counting from Zero or One. True = count from Zero.

    Accepts: $bool = (1|0)

Methods

Methods are object methods (not functional methods)

parse_column_row( $excel_row_id, $count_from_one )

    Definition: This is the way to turn an alpha numeric Excel cell ID into row and column integers. If count_from_zero = 1 but you want (column, row) pairs returned counting from 1 then set $count_from_one = 1. Or leave it blank to have the pair returned in the format defined by count_from_zero

    Accepts: $excel_row_id, $count_from_one

    Returns: ( $column_number, $row_number ) - integers

build_cell_label( $column, $row, $count_from_one )

    Definition: This is the way to turn a (column, row) pair into an excel ID. If $count_from_one is set then the ($column, $row pair will be treated at counting from one independant of how count_from_zero is set. integers

    Accepts: $column, $row, $count_from_one (in that order and position)

    Returns: ( $excel_cell_id ) - integers

counting_from_zero( $bool )

    Definition: This turns on (or off) counting from zero where the alternative is to count from 1.

    Accepts: $bool = (1|0)

    Returns: nothing

get_excel_position( $int )

    Definition: If you wish to use this sheet agnostically of the count_from_zero setting then you can use this method to translate integers to a count-from-one number. No action is taken if the attribute is set to 0.

    Accepts: a $count_from_one or a $count_from_zero int

    Returns: a $count_from_one int

get_used_position( $int )

    Definition: If you wish to use this sheet agnostically of the count_from_zero setting then you can use this method to translate integers from a count-from-one number to whatever scheme is in force from the attribute. No action is taken if the attribute is set to 0.

    Accepts: a $count_from_one int

    Returns: a $count_from_one or a $count_from_zero int

SUPPORT

TODO

    1. Add a read raw text between tags step in there somewhere

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 by Jed Lund

DEPENDENCIES

SEE ALSO