NAME
Spreadsheet::Reader::ExcelXML::XMLReader::WorkbookProps - Workbook docProps XML file unique reader
SYNOPSIS
#!/usr/bin/env perl
use MooseX::ShortCut::BuildInstance qw( build_instance );
use Types::Standard qw( HashRef );
use Spreadsheet::Reader::ExcelXML::XMLReader;
use Spreadsheet::Reader::ExcelXML::WorkbookFileInterface;
use Spreadsheet::Reader::ExcelXML::ZipReader::WorkbookProps;
use Spreadsheet::Reader::ExcelXML::WorkbookPropsInterface;
my $extractor_instance = build_instance(
superclasses => ['Spreadsheet::Reader::ExcelXML::XMLReader'],
package => 'ExtractorInstance',
file => '../../../../t/test_files/TestBook.xml',
add_roles_in_sequence =>[
'Spreadsheet::Reader::ExcelXML::WorkbookFileInterface',
],
);
my $file_handle = $extractor_instance->extract_file( qw( DocumentProperties ) );
my $test_instance = build_instance(
superclasses => ['Spreadsheet::Reader::ExcelXML::XMLReader'],
package => 'WorkbookPropsInterface',
add_roles_in_sequence =>[
'Spreadsheet::Reader::ExcelXML::XMLReader::WorkbookProps',
'Spreadsheet::Reader::ExcelXML::WorkbookPropsInterface',
],
file => $file_handle,
);
print $test_instance->$get_date_created . "\n";
###########################
# SYNOPSIS Screen Output
# 01: 2013-11-10T08:27:01Z
###########################
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 is the XML based file adaptor for reading the workbook docProps data and then updating the general workbook metadata. The extracted data is accessible through Methods. The goal of this module is to standardize the outputs of this metadata from non standard inputs.
Required Methods
These are the methods required by the role. A link to the default implementation of these methods is provided.
"advance_element_position( $element, [$iterations] )" in Spreadsheet::Reader::ExcelXML::XMLReader
"good_load( $state )" in Spreadsheet::Reader::ExcelXML::XMLReader
"close_the_file" in Spreadsheet::Reader::ExcelXML::XMLReader
"parse_element( [$depth] )" in Spreadsheet::Reader::ExcelXML::XMLReader
"squash_node( $node )" in Spreadsheet::Reader::ExcelXML::XMLReader
Methods
These are the methods provided by this role (only).
load_unique_bits
Definition: This role is meant to run on top of Spreadsheet::Reader::ExcelXML::XMLReader. When it does the reader will call this function as available when it first starts the file. Therefore this is where the unique Metadata for this file is found and stored. (in the attributes)
Accepts: nothing
Returns: nothing
get_creator
Definition: This returns the string stored in the file by Excel for the file creator.
Accepts: nothing
Returns: the creator identification string
get_modified_by
Definition: This returns the string stored in the file by Excel for the last file modification entity.
Accepts: nothing
Returns: the identification string for the last entity to modify the file
get_date_created
Definition: returns the date string for when the file was created in Excel
Accepts: nothing
Returns: a date string
get_date_modified
Definition: returns the date string for when the file was last modified in Excel
Accepts: nothing
Returns: a date string
SUPPORT
TODO
1. Nothing currently
AUTHOR
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
Spreadsheet::Reader::ExcelXML - the package
SEE ALSO
Spreadsheet::Read - generic Spreadsheet reader
Spreadsheet::ParseExcel - Excel binary version 2003 and earlier (.xls files)
Spreadsheet::XLSX - Excel version 2007 and later
Spreadsheet::ParseXLSX - Excel version 2007 and later
All lines in this package that use Log::Shiras are commented out