File Coverage

blib/lib/Spreadsheet/XLSX/Reader/LibXML/Cell.pm
Criterion Covered Total %
statement 26 49 53.0
branch 0 14 0.0
condition n/a
subroutine 9 14 64.2
pod 2 3 66.6
total 37 80 46.2


line stmt bran cond sub pod time code
1             package Spreadsheet::XLSX::Reader::LibXML::Cell;
2             our $AUTHORITY = 'cpan:JANDREW';
3 1     1   807696 use version; our $VERSION = version->declare('v0.38.22');
  1         2  
  1         8  
4             ###LogSD warn "You uncovered internal logging statements for Spreadsheet::XLSX::Reader::LibXML::Cell-$VERSION";
5              
6             $| = 1;
7 1     1   133 use 5.010;
  1         4  
8 1     1   5 use Moose;
  1         2  
  1         7  
9 1     1   7887 use MooseX::StrictConstructor;
  1         34329  
  1         7  
10 1     1   10150 use MooseX::HasDefaults::RO;
  1         8320  
  1         4  
11 1         10 use Types::Standard qw(
12             Str InstanceOf HashRef
13             Enum HasMethods ArrayRef
14             Int Maybe CodeRef
15             is_Object
16 1     1   10400 );
  1         2  
17 1     1   1782 use lib '../../../../../lib';
  1         2  
  1         10  
18             ###LogSD use Log::Shiras::Telephone;
19             ###LogSD use Log::Shiras::UnhideDebug;
20 1         20 use Spreadsheet::XLSX::Reader::LibXML::Types qw(
21             CellID
22 1     1   1073 );
  1         5  
23             ###LogSD with 'Log::Shiras::LogSpace';
24             ###LogSD sub get_class_space{ 'Cell' }
25             our $log_space = '';
26              
27             #########1 Public Attributes 3#########4#########5#########6#########7#########8#########9
28              
29             has error_inst =>(
30             isa => InstanceOf[ 'Spreadsheet::XLSX::Reader::LibXML::Error' ],
31             clearer => '_clear_error_inst',
32             reader => '_get_error_inst',
33             required => 1,
34             handles =>[ qw(
35             error set_error clear_error set_warnings if_warn
36             ) ],
37             );
38              
39             has cell_xml_value =>(
40             isa => Maybe[Str],
41             reader => 'xml_value',
42             predicate => 'has_xml_value',
43             #~ default => '',
44             );
45              
46             has cell_unformatted =>(
47             isa => Maybe[Str],
48             reader => '_unformatted',
49             predicate => 'has_unformatted',
50             #~ default => '',
51             );
52              
53             has rich_text =>(
54             isa => ArrayRef,
55             reader => 'get_rich_text',
56             predicate => 'has_rich_text',
57             );
58              
59             has cell_font =>(
60             isa => HashRef,
61             reader => 'get_font',
62             predicate => 'has_font',
63             );
64              
65             has cell_border =>(
66             isa => HashRef,
67             reader => 'get_border',
68             predicate => 'has_border',
69             );
70            
71             has cell_style =>(
72             isa => HashRef,
73             reader => 'get_style',
74             predicate => 'has_style',
75             );
76            
77             has cell_fill =>(
78             isa => HashRef,
79             reader => 'get_fill',
80             predicate => 'has_fill',
81             );
82            
83             has cell_alignment =>(
84             isa => HashRef,
85             reader => 'get_alignment',
86             predicate => 'has_alignment',
87             );
88              
89             has cell_type =>(
90             isa => Enum[qw( Text Numeric Date Custom )],
91             reader => 'type',
92             writer => '_set_cell_type',
93             predicate => 'has_type',
94             );
95              
96             has cell_encoding =>(
97             isa => Str,
98             reader => 'encoding',
99             predicate => 'has_encoding',
100             );
101              
102             has cell_merge =>(
103             isa => Str,
104             reader => 'merge_range',
105             predicate => 'is_merged',
106             );
107              
108             has cell_formula =>(
109             isa => Str,
110             reader => 'formula',
111             predicate => 'has_formula',
112             );
113            
114             has cell_row =>(
115             isa => Int,
116             reader => 'row',
117             predicate => 'has_row',
118             );
119            
120             has cell_col =>(
121             isa => Int,
122             reader => 'col',
123             predicate => 'has_col',
124             );
125              
126             has r =>(
127             isa => CellID,
128             reader => 'cell_id',
129             predicate => 'has_cell_id',
130             );
131              
132             has cell_hyperlink =>(
133             isa => ArrayRef,
134             reader => 'get_hyperlink',
135             predicate => 'has_hyperlink',
136             );
137              
138             has cell_hidden =>(
139             isa => Enum[qw( sheet column row 0 )],
140             reader => 'is_hidden',
141             default => 0,
142             );
143              
144             has cell_coercion =>(
145             isa => HasMethods[ 'assert_coerce', 'display_name' ],
146             reader => 'get_coercion',
147             writer => 'set_coercion',
148             predicate => 'has_coercion',
149             clearer => 'clear_coercion',
150             handles =>{
151             coercion_name => 'display_name',#
152             },
153             );
154              
155             #########1 Public Methods 3#########4#########5#########6#########7#########8#########9
156              
157             sub unformatted{
158 0     0 1   my( $self, ) = @_;
159             ###LogSD my $phone = Log::Shiras::Telephone->new( name_space =>
160             ###LogSD $self->get_all_space . '::unformatted', );
161             ###LogSD $phone->talk( level => 'debug', message => [
162             ###LogSD "Attempting to return the unformatted value of the cell" ] );
163             ###LogSD $phone->talk( level => 'trace', message => [ "Cell:", $self ] );
164            
165             # check if empty
166 0 0         return undef if !defined $self->has_unformatted;
167            
168             # get the value
169 0           my $unformatted = $self->_unformatted;
170             ###LogSD $phone->talk( level => 'debug', message => [ "unformatted:", $unformatted ] );
171 0           return $unformatted;
172             }
173              
174             sub value{
175 0     0 1   my( $self, ) = @_;
176             ###LogSD my $phone = Log::Shiras::Telephone->new( name_space =>
177             ###LogSD $self->get_all_space . '::value', );
178             ###LogSD $phone->talk( level => 'debug', message => [
179             ###LogSD 'Reached the -value- function' ] );
180             ###LogSD $phone->talk( level => 'trace', message => [ "Cell:", $self ] );
181 0 0         my $unformatted = defined $self->has_xml_value ? $self->xml_value : undef;
182             #~ my $unformatted = $self->unformatted;
183 0           return $self->_return_value_only(
184             $unformatted,
185             $self->get_coercion,
186             $self->_get_error_inst,
187             #~ ###LogSD $self->get_log_space,
188             );
189             }
190              
191             #########1 Private Attributes 3#########4#########5#########6#########7#########8#########9
192              
193              
194              
195             #########1 Private Methods 3#########4#########5#########6#########7#########8#########9
196              
197             after 'set_coercion' => sub{
198             my ( $self, ) = @_;
199             ###LogSD my $phone = Log::Shiras::Telephone->new( name_space =>
200             ###LogSD $self->get_all_space . '::set_coercion', );
201             ###LogSD $phone->talk( level => 'debug', message =>[
202             ###LogSD "Setting 'cell_type' to custom since the coercion has been set" ] );
203             $self->_set_cell_type( 'Custom' );
204             };
205              
206             sub _return_value_only{
207 0     0     my ( $self, $unformatted, $coercion, $error_inst ) = @_;# To be used by GetCell too
208             ###LogSD my $phone = Log::Shiras::Telephone->new( name_space =>
209             ###LogSD $self->get_class_space . '::hidden::_return_value_only', );
210             ###LogSD $phone->talk( level => 'debug', message =>[
211             ###LogSD "Returning the coerced value of -" . ( defined $unformatted ? $unformatted : '') . '-', ] );
212             ###LogSD $phone->talk( level => 'trace', message =>[
213             ###LogSD '..using coercion:' , $coercion ] ) if $coercion;
214 0           my $formatted = $unformatted;
215 0 0         if( !$coercion ){
    0          
    0          
216             ###LogSD $phone->talk( level => 'debug', message => [
217             ###LogSD "No coercion passed" ] );
218 0           return $unformatted;
219             }elsif( !defined $unformatted ){
220 0           $error_inst->set_error( "The cell does not have a value" );
221             }elsif( $unformatted eq '' ){
222 0           $error_inst->set_error( "The cell has the empty string for a value" );
223             }else{
224             ###LogSD $phone->talk( level => 'debug', message => [
225             ###LogSD "Attempting to return the value of the cell formatted to " .
226             ###LogSD (($coercion) ? $coercion->display_name : 'No conversion available' ) ] );
227 0           my $sig_warn = $SIG{__WARN__};
228 0     0     $SIG{__WARN__} = sub{};
229 0           eval '$formatted = $coercion->assert_coerce( $unformatted )';
230 0 0         $error_inst->set_error( $@ ) if( $@ );
231 0           $SIG{__WARN__} = $sig_warn;
232             }
233 0 0         $formatted =~ s/\\//g if $formatted;
234             ###LogSD $phone->talk( level => 'debug', message => [
235             ###LogSD "Format is:", $coercion->display_name,
236             ###LogSD "Returning the formated value: " .
237             ###LogSD ( $formatted ? $formatted : '' ), ] );
238 0           return $formatted;
239             }
240              
241             #########1 Private Methods 3#########4#########5#########6#########7#########8#########9
242              
243             sub DEMOLISH{
244 0     0 0   my ( $self ) = @_;
245             ###LogSD my $phone = Log::Shiras::Telephone->new( name_space =>
246             ###LogSD $self->get_all_space . '::hidden::DEMOLISH', );
247             ###LogSD $phone->talk( level => 'debug', message => [
248             ###LogSD "clearing the cell for cell-ID:" . $self->cell_id, ] );
249             #~ print "Clearing coercion\n";
250 0           $self->clear_coercion;
251             #~ print "Clearing error instance\n";
252 0           $self->_clear_error_inst;
253             }
254              
255             #########1 Phinish 3#########4#########5#########6#########7#########8#########9
256              
257 1     1   1936 no Moose;
  1         2  
  1         11  
258             __PACKAGE__->meta->make_immutable;
259            
260             1;
261              
262             #########1 Documentation 3#########4#########5#########6#########7#########8#########9
263             __END__
264              
265             =head1 NAME
266              
267             Spreadsheet::XLSX::Reader::LibXML::Cell - XLSX Cell data class
268              
269             =head1 SYNOPSIS
270              
271             See the SYNOPSIS in the L<Workbook class|Spreadsheet::XLSX::Reader::LibXML/SYNOPSIS>
272            
273             =head1 DESCRIPTION
274              
275             This is the class that contains cell data. There are no XML parsing actions taken in the
276             background of this class. All data has been pre-coalated/built from the L<Worksheet
277             |Spreadsheet::XLSX::Reader::LibXML::Worksheet> class. In general the Worksheet class
278             will populate the attributes of this class when it is generated. If you want to use it
279             as a standalone class just fill in the L<Attributes|/Attributes> below. It should be
280             noted that the Worksheet class also L<pre-converts
281             |Spreadsheet::XLSX::Reader::LibXML::FmtDefault/change_output_encoding( $string )> the
282             unformatted value as well.
283              
284             =head2 Primary Methods
285              
286             These are methods used to transform data stored in the L<Attributes|/Attributes>
287             (not just return it directly). All methods are object methods and should be implemented
288             on the instance.
289              
290             B<Example:>
291              
292             my $unformatted_value = $cell_intance->unformatted;
293              
294             =head3 unformatted
295              
296             =over
297              
298             B<Definition:> Returns the unformatted value of the cell
299              
300             B<Accepts:>Nothing
301              
302             B<Returns:> the raw L<Excel visible|/xml_value> cell value
303              
304             =back
305              
306             =head3 has_unformatted
307              
308             =over
309              
310             B<Definition:> This is a predicate method to determine if the cell had any value stored in it.
311             Sometimes this class will be generated by the
312             L<Worksheet|Spreadsheet::XLSX::Reader::LibXML::Worksheet> class when there is cell formatting but
313             no value. Ex. Merged cells store the value in the left upper corner of the merged area but have
314             cell specific formatting for all cells in the merge area.
315              
316             B<Accepts:>Nothing
317              
318             B<Returns:> True if the cell holds an unformatted value (even if it is just a space or empty string)
319              
320             =back
321              
322             =head3 value
323              
324             =over
325              
326             B<Definition:> Returns the formatted value of the cell transformed from the
327             L<unformatted|/unformatted> string. This method uses the conversion stored in the
328             L<cell_coercion|/cell_coercion> attribute. If there is no format/conversion set
329             then this will return the unformatted value. Any failures to process this value can be
330             retrieved with L<$self-E<gt>error|/error>.
331              
332             B<Accepts:>Nothing
333              
334             B<Returns:> the cell value processed by the set conversion
335              
336             =back
337              
338             =head3 xml_value
339              
340             =over
341              
342             B<Definition:> L<Tux|https://metacpan.org/author/HMBRAND>Pointed out with a test case that the
343             underlying xml and the visible unformatted data (in the formula bar of the excel application) can
344             differ even when no formal format is applied. I'm not sure where this performance comes from but
345             I suspect legacy behaviour inheritance. In any case the variation appears to occur only in the
346             case of stored scientific notiation at very detailed precision. To support the access of both
347             I have left the 'unformatted' representing the visible data in the spreadsheet with the 'xml_value'
348             method returning the stored value in xml. I would welcome any additional nuance that you are aware
349             of in this area L<SUPPORT|/SUPPORT>.
350              
351             B<Accepts:>Nothing
352              
353             B<Returns:> the raw xml cell value
354              
355             =back
356              
357             =head3 has_xml_value
358              
359             =over
360              
361             B<Definition:> This is a predicate method to determine if the cell had any value stored in it.
362             This method and L<has_unformatted|/has_unformatted> should return exactly the same result in all
363             cases. See that method for more explanation.
364              
365             B<Accepts:>Nothing
366              
367             B<Returns:> True if the cell xml holds a value (even if it is just a space or empty string)
368              
369             =back
370              
371             =head2 Attributes
372              
373             This class is just a storage of coallated information about the requested cell stored
374             in the following attributes. For more information on attributes see
375             L<Moose::Manual::Attributes>. The meta data about the cell can be retrieved from each
376             attribute using the 'attribute methods'.
377              
378             =head3 error_inst
379              
380             =over
381              
382             B<Definition:> This attribute holds an 'error' object instance. In general
383             the package shares a reference for this instance accross the workbook with all
384             worksheets and all cells so any set or get action should return the latest error state
385             from anywhere. (not just the instance you are working on)
386              
387             B<Default:> a L<Spreadsheet::XLSX::Reader::LibXML::Error> instance with the
388             attributes set as;
389            
390             ( should_warn => 0 )
391              
392             B<Range:> The minimum list of methods to implement for your own instance is;
393              
394             error set_error clear_error set_warnings if_warn
395              
396             B<attribute methods> Methods provided to adjust this attribute
397              
398             =over
399              
400             B<get_error_inst>
401              
402             =over
403              
404             B<Definition:> returns this instance
405              
406             =back
407              
408             B<error>
409              
410             =over
411              
412             B<Definition:> Used to get the most recently logged error
413              
414             =back
415              
416             B<set_error>
417              
418             =over
419              
420             B<Definition:> used to set a new error string
421            
422             =back
423              
424             B<clear_error>
425              
426             =over
427              
428             B<Definition:> used to clear the current error string in this attribute
429            
430             =back
431              
432             B<set_warnings>
433              
434             =over
435              
436             B<Definition:> used to turn on or off real time warnings when errors are set.
437             This is a delegated method from the error instance.
438            
439             =back
440              
441             B<if_warn>
442              
443             =over
444              
445             B<Definition:> a method mostly used to extend this package and see if warnings
446             should be emitted.
447            
448             =back
449              
450             =back
451              
452             =back
453              
454             =head3 cell_unformatted
455              
456             =over
457              
458             B<Definition:> This holds the unformatted value of the cell (if any)
459              
460             B<Default:> undef
461              
462             B<Range:> a string
463              
464             B<attribute methods> Methods provided to adjust this attribute
465            
466             =over
467              
468             B<unformatted>
469              
470             =over
471              
472             B<Definition:> returns the attribute value
473            
474             =back
475            
476             =over
477              
478             B<has_unformatted>
479              
480             =over
481              
482             B<Definition:> a predicate method to determine if any value is in the cell
483            
484             =back
485              
486             =back
487              
488             =back
489              
490             =back
491              
492             =head3 rich_text
493              
494             =over
495              
496             B<Definition:> This attribute hold a rich text data structure like
497             L<Spreadsheet::ParseExcel::Cell/get_rich_text()> with the exception that it
498             doesn't bless each hashref into an object. The hashref's are also organized
499             per the Excel xlsx information in the the sharedStrings.xml file. In general
500             this is an arrayref of arrayrefs where the second level contains two positions.
501             The first position is the place (from zero) where the formatting is implemented.
502             The second position is a hashref of the formatting values. The format is inforce
503             until the next start place is identified.
504              
505             =over
506              
507             B<note:> It is important to understand that Excel can store two formats for the
508             same cell and often they don't agree. For example using the attribute L<cell_font
509             |/cell_font> will not always contain the same value as specific fonts (or any font)
510             listed in the rich text array.
511             f
512             =back
513              
514             B<Default:> undef = no rich text defined for this cell
515              
516             B<Range:> an array ref of rich_text positions and definitions
517              
518             B<attribute methods> Methods provided to adjust this attribute
519            
520             =over
521              
522             B<get_rich_text>
523              
524             =over
525              
526             B<Definition:> returns the attribute value
527            
528             =back
529              
530             B<has_rich_text>
531              
532             =over
533              
534             B<Definition:> Indicates if the attribute has anything stored
535            
536             =back
537              
538             =back
539              
540             =back
541              
542             =back
543              
544             =head3 cell_font
545              
546             =over
547              
548             B<Definition:> This holds the font assigned to the cell
549              
550             B<Default:> undef
551              
552             B<Range:> a hashref of definitions for the font
553              
554             B<attribute methods> Methods provided to adjust this attribute
555            
556             =over
557              
558             B<get_font>
559              
560             =over
561              
562             B<Definition:> returns the attribute value
563            
564             =back
565              
566             B<has_font>
567              
568             =over
569              
570             B<Definition:> Indicates if the attribute has anything stored
571            
572             =back
573              
574             =back
575              
576             =back
577              
578             =head3 cell_border
579              
580             =over
581              
582             B<Definition:> This holds the border settings assigned to the cell
583              
584             B<Default:> undef
585              
586             B<Range:> a hashref of border definitions
587              
588             B<attribute methods> Methods provided to adjust this attribute
589            
590             =over
591              
592             B<get_border>
593              
594             =over
595              
596             B<Definition:> returns the attribute value
597            
598             =back
599              
600             B<has_border>
601              
602             =over
603              
604             B<Definition:> Indicates if the attribute has anything stored
605            
606             =back
607              
608             =back
609              
610             =back
611              
612             =head3 cell_style
613              
614             =over
615              
616             B<Definition:> This holds the border settings assigned to the cell
617              
618             B<Default:> undef
619              
620             B<Range:> a hashref of style definitions
621              
622             B<attribute methods> Methods provided to adjust this attribute
623            
624             =over
625              
626             B<get_style>
627              
628             =over
629              
630             B<Definition:> returns the attribute value
631            
632             =back
633              
634             B<has_style>
635              
636             =over
637              
638             B<Definition:> Indicates if the attribute has anything stored
639            
640             =back
641            
642             =back
643            
644             =back
645              
646             =head3 cell_fill
647              
648             =over
649              
650             B<Definition:> This holds the fill settings assigned to the cell
651              
652             B<Default:> undef
653              
654             B<Range:> a hashref of style definitions
655              
656             B<attribute methods> Methods provided to adjust this attribute
657            
658             =over
659              
660             B<get_fill>
661              
662             =over
663              
664             B<Definition:> returns the attribute value
665            
666             =back
667              
668             B<has_fill>
669              
670             =over
671              
672             B<Definition:> Indicates if the attribute has anything stored
673            
674             =back
675            
676             =back
677            
678             =back
679              
680             =head3 cell_type
681              
682             =over
683              
684             B<Definition:> This holds the type of data stored in the cell. In general it
685             follows the convention of L<ParseExcel
686             |Spreadsheet::ParseExcel/ChkType($self, $is_numeric, $format_index)> (Date, Numeric,
687             or Text) however, since custom coercions will change data to some possible non excel
688             standard state this also allows a 'Custom' type representing any cell with a custom
689             conversion assigned to it (by you either at the worksheet level or here).
690              
691             B<Default:> Text
692              
693             B<Range:> Text = Strings, Numeric = Real Numbers, Date = Real Numbers with an
694             assigned Date conversion, Custom = any stored value with a custom conversion
695              
696             B<attribute methods> Methods provided to adjust this attribute
697            
698             =over
699              
700             B<type>
701              
702             =over
703              
704             B<Definition:> returns the attribute value
705            
706             =back
707              
708             B<has_type>
709              
710             =over
711              
712             B<Definition:> Indicates if the attribute has anything stored (Always true)
713            
714             =back
715            
716             =back
717            
718             =back
719              
720             =head3 cell_encoding
721              
722             =over
723              
724             B<Definition:> This holds the byte encodeing of the data stored in the cell
725              
726             B<Default:> Unicode
727              
728             B<Range:> Traditional encoding options
729              
730             B<attribute methods> Methods provided to adjust this attribute
731            
732             =over
733              
734             B<encoding>
735              
736             =over
737              
738             B<Definition:> returns the attribute value
739            
740             =back
741              
742             B<has_encoding>
743              
744             =over
745              
746             B<Definition:> Indicates if the attribute has anything stored
747            
748             =back
749            
750             =back
751            
752             =back
753              
754             =head3 cell_merge
755              
756             =over
757              
758             B<Definition:> if the cell is part of a group of merged cells this will
759             store the upper left and lower right cell ID's in a string concatenated
760             with a ':'
761              
762             B<Default:> undef
763              
764             B<Range:> two cell ID's
765              
766             B<attribute methods> Methods provided to adjust this attribute
767            
768             =over
769              
770             B<merge_range>
771              
772             =over
773              
774             B<Definition:> returns the attribute value
775            
776             =back
777              
778             B<is_merged>
779              
780             =over
781              
782             B<Definition:> Indicates if the attribute has anything stored
783            
784             =back
785            
786             =back
787            
788             =back
789              
790             =head3 cell_formula
791              
792             =over
793              
794             B<Definition:> if the cell value (unformatted) is calculated based on a
795             formula the Excel formula string is stored in this attribute.
796              
797             B<Default:> undef
798              
799             B<Range:> Excel formula string
800              
801             B<attribute methods> Methods provided to adjust this attribute
802            
803             =over
804              
805             B<formula>
806              
807             =over
808              
809             B<Definition:> returns the attribute value
810            
811             =back
812              
813             B<has_formula>
814              
815             =over
816              
817             B<Definition:> Indicates if the attribute has anything stored
818            
819             =back
820            
821             =back
822            
823             =back
824              
825             =head3 cell_row
826              
827             =over
828              
829             B<Definition:> This is the sheet row that the cell was read from
830              
831             B<Range:> the minimum row to the maximum row
832              
833             B<attribute methods> Methods provided to adjust this attribute
834            
835             =over
836              
837             B<row>
838              
839             =over
840              
841             B<Definition:> returns the attribute value
842            
843             =back
844              
845             B<has_row>
846              
847             =over
848              
849             B<Definition:> Indicates if the attribute has anything stored
850            
851             =back
852            
853             =back
854            
855             =back
856              
857             =head3 cell_col
858              
859             =over
860              
861             B<Definition:> This is the sheet column that the cell was read from
862              
863             B<Range:> the minimum column to the maximum column
864              
865             B<attribute methods> Methods provided to adjust this attribute
866            
867             =over
868              
869             B<col>
870              
871             =over
872              
873             B<Definition:> returns the attribute value
874            
875             =back
876              
877             B<has_col>
878              
879             =over
880              
881             B<Definition:> Indicates if the attribute has anything stored
882            
883             =back
884            
885             =back
886            
887             =back
888              
889             =head3 r
890              
891             =over
892              
893             B<Definition:> This is the cell ID of the cell
894              
895             B<attribute methods> Methods provided to adjust this attribute
896            
897             =over
898              
899             B<cell_id>
900              
901             =over
902              
903             B<Definition:> returns the attribute value
904            
905             =back
906              
907             B<has_cell_id>
908              
909             =over
910              
911             B<Definition:> Indicates if the attribute has anything stored
912            
913             =back
914            
915             =back
916            
917             =back
918              
919             =head3 cell_hyperlink
920              
921             =over
922              
923             B<Definition:> This stores any hyperlink from the cell
924              
925             B<attribute methods> Methods provided to adjust this attribute
926            
927             =over
928              
929             B<get_hyperlink>
930              
931             =over
932              
933             B<Definition:> returns the attribute value
934            
935             =back
936              
937             B<has_hyperlink>
938              
939             =over
940              
941             B<Definition:> Indicates if the attribute has anything stored
942            
943             =back
944            
945             =back
946            
947             =back
948              
949             =head3 cell_coercion
950              
951             =over
952              
953             B<Definition:> This attribute holds the tranformation code to turn an
954             unformatted value into a formatted value.
955              
956             B<Default:> a L<Type::Tiny> instance with sub types set to assign different
957             inbound data types to different coercions for the target outcome of formatted
958             data.
959              
960             B<Range:> If you wish to set this with your own code it must have two
961             methods. First, 'assert_coerce' which will be applied when transforming
962             the unformatted value. Second, 'display_name' which will be used to self
963             identify. For an example of how to build a custom format see
964             L<Spreadsheet::XLSX::Reader::LibXML::Worksheet/custom_formats>.
965              
966             B<attribute methods> Methods provided to adjust this attribute
967            
968             =over
969              
970             B<get_coercion>
971              
972             =over
973              
974             B<Definition:> returns this instance
975            
976             =back
977              
978             B<clear_coercion>
979              
980             =over
981              
982             B<Definition:> used to clear the this attribute
983            
984             =back
985              
986             B<set_coercion>
987              
988             =over
989              
990             B<Definition:> used to set a new coercion instance. Implementation of this
991             method will also switch the cell type to 'Custom'.
992            
993             =back
994              
995             B<has_coercion>
996              
997             =over
998              
999             B<Definition:> Indicate if any coecion code is applied
1000            
1001             =back
1002              
1003             B<coercion_name>
1004              
1005             =over
1006              
1007             B<Definition:> calls 'display_name' on the code in the background
1008            
1009             =back
1010            
1011             =back
1012            
1013             =back
1014              
1015             =head3 cell_hidden
1016              
1017             =over
1018              
1019             B<Definition:> if the cell would not be visible when this file is parsed by a the
1020             Microsoft Excel application then this attribute is true.
1021              
1022             B<Default:> 0 = Not hidden
1023              
1024             B<Range:> sheet = the sheet is hidden, column = the column is hidden, row = the row is hidden.
1025             When two or more of these conditions is true the leftmost in the list is displayed.
1026              
1027             B<attribute methods> Methods provided to adjust this attribute
1028            
1029             =over
1030              
1031             B<is_hidden>
1032              
1033             =over
1034              
1035             B<Definition:> returns the attribute value
1036            
1037             =back
1038            
1039             =back
1040            
1041             =back
1042              
1043             =head1 SUPPORT
1044              
1045             =over
1046              
1047             L<github Spreadsheet::XLSX::Reader::LibXML/issues
1048             |https://github.com/jandrew/Spreadsheet-XLSX-Reader-LibXML/issues>
1049              
1050             =back
1051              
1052             =head1 TODO
1053              
1054             =over
1055              
1056             B<1.> Return the merge range in array and hash formats
1057              
1058             B<2.> Add calc chain values
1059              
1060             B<3.> Have unformatted return '' (the empty string) rather than undef for null?
1061              
1062             =back
1063              
1064             =head1 AUTHOR
1065              
1066             =over
1067              
1068             Jed Lund
1069              
1070             jandrew@cpan.org
1071              
1072             =back
1073              
1074             =head1 COPYRIGHT
1075              
1076             This program is free software; you can redistribute
1077             it and/or modify it under the same terms as Perl itself.
1078              
1079             The full text of the license can be found in the
1080             LICENSE file included with this module.
1081              
1082             This software is copyrighted (c) 2014, 2015 by Jed
1083              
1084             =head1 DEPENDENCIES
1085              
1086             =over
1087              
1088             L<version> 0.77
1089              
1090             L<perl 5.010|perl/5.10.0>
1091              
1092             L<Moose>
1093              
1094             L<MooseX::StrictConstructor>
1095              
1096             L<MooseX::HasDefaults::RO>
1097              
1098             L<Type::Tiny> - 1.000>
1099              
1100             L<Spreadsheet::XLSX::Reader::LibXML::Types>
1101              
1102             =back
1103              
1104             =head1 SEE ALSO
1105              
1106             =over
1107              
1108             L<Spreadsheet::ParseExcel> - Excel 2003 and earlier
1109              
1110             L<Spreadsheet::XLSX> - 2007+
1111              
1112             L<Spreadsheet::ParseXLSX> - 2007+
1113              
1114             L<Log::Shiras|https://github.com/jandrew/Log-Shiras>
1115              
1116             =over
1117              
1118             All lines in this package that use Log::Shiras are commented out
1119              
1120             =back
1121              
1122             =back
1123              
1124             =cut
1125              
1126             #########1#########2 main pod documentation end 5#########6#########7#########8#########9