NAME

Spreadsheet::XLSX::Reader::LibXML::CalcChain - Read xlsx calcChain files with LibXML

SYNOPSIS

The following uses the 'calcChain.xml' file found in the t/test_files/xl/ folder. It also uses the XMLReader version of the CalcChain class. Any version will do.

    #!/usr/bin/env perl
    $|=1;
    use Data::Dumper;
    use Spreadsheet::XLSX::Reader::LibXML::Error;
    use Spreadsheet::XLSX::Reader::LibXML::XMLReader::CalcChain;

    my $file_instance = Spreadsheet::XLSX::Reader::LibXML::XMLReader::CalcChain->new(
                            file_name => 'calcChain.xml',
							error_inst => Spreadsheet::XLSX::Reader::LibXML::Error->new,
                        );
    print Dumper( $file_instance->get_calc_chain_position( 2 ) );
	
	}

	###########################
	# SYNOPSIS Screen Output
	# 01: $VAR1 = {
	# 02:           'r' => 'D14',
	# 03:           's' => '1'
 	# 04:         };
	###########################

DESCRIPTION

This general class is written to access the sub file calcChain in an unzipped .xlsx file. The file is generally found in the xl/ folder of the unzipped file. This file contains the calculation sequence and data source used for identified formulas in the sheet. (The formula tie to these elements is maintained outside of this sheet. To build it differently you would need to fork the github package and insert the call for this class in the $parser_modules variable maintained in the Spreadsheet::XLSX::Reader::LibXML class. (about line 34). Each individual type of CalcChain reader '.pm' file also has it's own POD.

Primary Methods

These are the primary ways to use this class. For additional calcChain options see the Attributes section.

get_calc_chain_position( $integer )

    Definition: This will return the calcChain information from the identified $integer position. (Counting from zero). The information is returned as a perl hash ref.

    Accepts: an $integer for the calcChain position

    Returns: a hash ref of data

Attributes

Data passed to new when creating an instance. For modification of these attributes see the listed 'attribute methods'. For more information on attributes see Moose::Manual::Attributes.

file_name

    Definition: This needs to be the full file path to the calcChain file to be parsed.

    Required: Yes

    Default: none

    Range an actual Excel 2007+ calcChain file

    attribute methods Methods provided to adjust this attribute

get_file_name

error_inst

    Definition: Currently all CalcChain readers require an Error instance.

    Required: Yes

    Default: none

    Range: The minimum list of methods to implement for your own instance is;

    error set_error clear_error set_warnings if_warn

    attribute methods Methods provided to adjust this attribute

get_error_inst

    Definition: returns this instance

error

    Definition: Used to get the most recently logged error

set_error

    Definition: used to set a new error string

clear_error

    Definition: used to clear the current error string in this attribute

set_warnings

    Definition: used to turn on or off real time warnings when errors are set

if_warn

    Definition: a method mostly used to extend this package and see if warnings should be emitted.

SUPPORT

TODO

    1. Write a DOM version of the parser

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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 93:

You forgot a '=back' before '=head3'