Skip to content

Commit

Permalink
Merge 4f4718b into 4cd5993
Browse files Browse the repository at this point in the history
  • Loading branch information
Jed committed Oct 10, 2015
2 parents 4cd5993 + 4f4718b commit c1e061b
Show file tree
Hide file tree
Showing 32 changed files with 1,508 additions and 961 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -10,10 +10,13 @@ lib/Spreadsheet/XLSX/Reader/LibXML/XMLDOM/*
t/Spreadsheet/XLSX/Reader/LibXML/XMLDOM/*
t/test_files/spread_test.xlsx
t/test_files/relo-data-2015.09.18.xlsx
t/121206_Raw Data - Call Logs_ken.xlsx
t/04-endless_loop_bug.t
t/05-bad_xml_example_bug.t
t/06-bad_gism_example.t
t/test_files/spread_test*
t/test_files/relo-data-2015.09.18*
t/test_files/121206_Raw Data - Call Logs_ken*
t/test_files/ChartSheet/*
t/test_files/ChartSheet.zip
t/test_files/metaExample*
Expand Down
17 changes: 16 additions & 1 deletion Changes
Expand Up @@ -11,7 +11,22 @@ be method matched to Spreadsheet::ParseExcel prior to the 1.0 release.

{{$NEXT}}

* Another Cool change
* Another cool change

v0.38.20 2015-10-10 06:28:21-07:00 America/Los_Angeles

+ Added an Attribute that allows control of whether the errors get Carp's longmess
+ Added better handling of double digit text years in conversion to a date
This assumes that the year is no more than 20 years in the future or 80 years
in the past of the process time
+ Added an attribute 'european_first' to the formatter that prioritizes the DD-MM-YY
style of date string parsing over MM-DD-YY
+ Re-wrote the worksheet parser to have a 'fast-forward' mode.
This reduces the intermediate processing (time) spent on advancing through the worksheet
when you don't want the values, closes #83 in github
! Added a test for bad worksheet dimension values in a worksheet, closes #79 in github
! Added a test for missing row span attributes in a row node, closes #78 in github
+ Aligned dist.ini a bit with the other packages I maintain

v0.38.18 2015-09-24 10:52:42-07:00 America/Los_Angeles

Expand Down
6 changes: 5 additions & 1 deletion DevelopmentNotes.txt
@@ -1 +1,5 @@
password for opening and the 'Data' tab of CodeTest.xlsm file is 'stupidpwd'
password for opening and the 'Data' tab of CodeTest.xlsm file is 'stupidpwd'
Add a test that reads a row with spaces and then force a rewind and call that row again to see if it creates an endless loop
2015-10-05 I've adjusted the unzipped files enough that it't time to not adjust 'TestBook.xlsx' and unzip it anymore.
The name space should be owned by the instance and shared via observer rather than passed and stored in each sub object (worksheet or reader)
This should be fixed sooner rather than later!!!!!!!!!!
5 changes: 4 additions & 1 deletion MANIFEST.SKIP
Expand Up @@ -2,6 +2,8 @@
^t/02-pod\.t
^t/03-tap_harness_tests\.t
^t/04-endless_loop_bug\.t
^t/05-bad_xml_example_bug\.t
^t/06-bad_gism_example\.t
^DevelopmentNotes.txt
^p5-alien-libxml*
^.gitignore
Expand All @@ -26,4 +28,5 @@
^t/04-endless_loop_bug\.t
^t/05-bad_xml_example_bug\.t
^t/test_files/ChartSheet.[^x]
^t/test_files/metaExample*
^t/test_files/metaExample*
^t/test_files/121206_Raw Data - Call Logs_ken*
37 changes: 20 additions & 17 deletions META.json
Expand Up @@ -26,11 +26,14 @@
"Carp" : "0",
"Clone" : "0",
"Data::Dumper" : "0",
"DateTime" : "0",
"DateTime::Format::Flexible" : "0",
"DateTimeX::Format::Excel" : "0.012",
"Devel::StackTrace" : "0",
"Encode" : "0",
"IO::File" : "0",
"List::Util" : "1.33",
"Modern::Perl" : "0",
"Moose" : "2.1213",
"Moose::Role" : "0",
"MooseX::HasDefaults::RO" : "0",
Expand Down Expand Up @@ -82,67 +85,67 @@
"provides" : {
"Spreadsheet::XLSX::Reader::LibXML" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::Cell" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/Cell.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::CellToColumnRow" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/CellToColumnRow.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::Error" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/Error.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::FmtDefault" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/FmtDefault.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::ParseExcelFormatStrings" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/ParseExcelFormatStrings.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::Row" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/Row.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::Types" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/Types.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::Worksheet" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/Worksheet.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLReader" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLReader::CalcChain" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/CalcChain.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLReader::Chartsheet" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/Chartsheet.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLReader::SharedStrings" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/SharedStrings.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLReader::Styles" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/Styles.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLReader::WorksheetToRow" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/WorksheetToRow.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
},
"Spreadsheet::XLSX::Reader::LibXML::XMLToPerlData" : {
"file" : "lib/Spreadsheet/XLSX/Reader/LibXML/XMLToPerlData.pm",
"version" : "v0.38.18"
"version" : "v0.38.20"
}
},
"release_status" : "stable",
Expand All @@ -157,7 +160,7 @@
"web" : "https://github.com/jandrew/Spreadsheet-XLSX-Reader-LibXML"
}
},
"version" : "v0.38.18",
"version" : "v0.38.20",
"x_authority" : "cpan:JANDREW"
}

37 changes: 20 additions & 17 deletions META.yml
Expand Up @@ -40,62 +40,65 @@ name: Spreadsheet-XLSX-Reader-LibXML
provides:
Spreadsheet::XLSX::Reader::LibXML:
file: lib/Spreadsheet/XLSX/Reader/LibXML.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::Cell:
file: lib/Spreadsheet/XLSX/Reader/LibXML/Cell.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::CellToColumnRow:
file: lib/Spreadsheet/XLSX/Reader/LibXML/CellToColumnRow.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::Error:
file: lib/Spreadsheet/XLSX/Reader/LibXML/Error.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::FmtDefault:
file: lib/Spreadsheet/XLSX/Reader/LibXML/FmtDefault.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::ParseExcelFormatStrings:
file: lib/Spreadsheet/XLSX/Reader/LibXML/ParseExcelFormatStrings.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::Row:
file: lib/Spreadsheet/XLSX/Reader/LibXML/Row.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::Types:
file: lib/Spreadsheet/XLSX/Reader/LibXML/Types.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::Worksheet:
file: lib/Spreadsheet/XLSX/Reader/LibXML/Worksheet.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLReader:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLReader::CalcChain:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/CalcChain.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLReader::Chartsheet:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/Chartsheet.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLReader::SharedStrings:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/SharedStrings.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLReader::Styles:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/Styles.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLReader::WorksheetToRow:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLReader/WorksheetToRow.pm
version: v0.38.18
version: v0.38.20
Spreadsheet::XLSX::Reader::LibXML::XMLToPerlData:
file: lib/Spreadsheet/XLSX/Reader/LibXML/XMLToPerlData.pm
version: v0.38.18
version: v0.38.20
requires:
Archive::Zip: '0'
Carp: '0'
Clone: '0'
Data::Dumper: '0'
DateTime: '0'
DateTime::Format::Flexible: '0'
DateTimeX::Format::Excel: '0.012'
Devel::StackTrace: '0'
Encode: '0'
IO::File: '0'
List::Util: '1.33'
Modern::Perl: '0'
Moose: '2.1213'
Moose::Role: '0'
MooseX::HasDefaults::RO: '0'
Expand All @@ -117,5 +120,5 @@ resources:
bugtracker: https://github.com/jandrew/Spreadsheet-XLSX-Reader-LibXML/issues
homepage: https://github.com/jandrew/Spreadsheet-XLSX-Reader-LibXML
repository: https://github.com/jandrew/Spreadsheet-XLSX-Reader-LibXML.git
version: v0.38.18
version: v0.38.20
x_authority: cpan:JANDREW
8 changes: 7 additions & 1 deletion Makefile.PL
Expand Up @@ -24,11 +24,14 @@ my %WriteMakefileArgs = (
"Carp" => 0,
"Clone" => 0,
"Data::Dumper" => 0,
"DateTime" => 0,
"DateTime::Format::Flexible" => 0,
"DateTimeX::Format::Excel" => "0.012",
"Devel::StackTrace" => 0,
"Encode" => 0,
"IO::File" => 0,
"List::Util" => "1.33",
"Modern::Perl" => 0,
"Moose" => "2.1213",
"Moose::Role" => 0,
"MooseX::HasDefaults::RO" => 0,
Expand Down Expand Up @@ -71,7 +74,7 @@ my %WriteMakefileArgs = (
"XML::LibXML::Reader" => 0,
"version" => "0.77"
},
"VERSION" => "v0.38.18",
"VERSION" => "v0.38.20",
"test" => {
"TESTS" => "t/Spreadsheet/XLSX/Reader/*.t t/Spreadsheet/XLSX/Reader/LibXML/*.t t/Spreadsheet/XLSX/Reader/LibXML/XMLReader/*.t"
}
Expand All @@ -84,12 +87,15 @@ my %FallbackPrereqs = (
"Carp" => 0,
"Clone" => 0,
"Data::Dumper" => 0,
"DateTime" => 0,
"DateTime::Format::Flexible" => 0,
"DateTimeX::Format::Excel" => "0.012",
"Devel::StackTrace" => 0,
"Encode" => 0,
"ExtUtils::MakeMaker" => "7.04",
"IO::File" => 0,
"List::Util" => "1.33",
"Modern::Perl" => 0,
"Moose" => "2.1213",
"Moose::Role" => 0,
"MooseX::HasDefaults::RO" => 0,
Expand Down
Expand Up @@ -19,8 +19,7 @@
my $worksheet = $workbook->worksheet( 'Sheet5' );
$worksheet->set_custom_formats( {
B2 => DateTimeStringOneType,
C2 => DateTimeStringOneType,
D2 => DateTimeStringOneType,
2 =>'yyyy-m-d',
} );
my $value;
while( !$value or $value ne 'EOF' ){
Expand Down
36 changes: 35 additions & 1 deletion README.pod
Expand Up @@ -19,7 +19,7 @@ Spreadsheet::XLSX::Reader::LibXML - Read xlsx spreadsheet files with LibXML
</a>

<a>
<img src="https://img.shields.io/badge/this version-0.38.18-brightgreen.svg" alt="this version">
<img src="https://img.shields.io/badge/this version-0.38.20-brightgreen.svg" alt="this version">
</a>

<a href="https://metacpan.org/pod/Spreadsheet::XLSX::Reader::LibXML">
Expand Down Expand Up @@ -212,6 +212,20 @@ intention of doing so. Therefore my research indicates there should be no risk
while parsing even an infected xlsm file with this package but I encourage you to use your own
judgement in this area.

B<6.> This package will read some files with 'broken' xml. In general this should be
transparent but in the case of the maximum row value and the maximum column value for a
worksheet it can cause some surprising problems. For instance the answer to the methods
L<Spreadsheet::XLSX::Reader::LibXML::Worksheet/row_range> and
L<Spreadsheet::XLSX::Reader::LibXML::Worksheet/col_range> can change as more of the sheet is
parsed. This includes the possibility that the maximum values are initially listed as 'undef'
if the sheet does not provide them in the metadata. The sheet will improve these values as cells
are read and more definitive information is available based on the dimensional scope of the users
cell parsing. The primary cause of these broken XML elements are non-XML applications writing to
the excel spreadsheet. You can use the attribute L<file_boundary_flags|/file_boundary_flags> or
the methods L<Spreadsheet::XLSX::Reader::LibXML::Worksheet/get_next_value> or
L<Spreadsheet::XLSX::Reader::LibXML::Worksheet/fetchrow_arrayref> to overcome the missing
metadata.

=head2 Attributes

Data passed to new when creating an instance. For modification of these attributes see the
Expand Down Expand Up @@ -378,6 +392,24 @@ B<if_warn>
B<Definition:> delegated method from the class used to extend this package and
see if warnings should be emitted.

=back

B<should_spew_longmess>

=over

B<Definition:> delegated method from the class used to turn on or off the L<Carp>
'longmess'for error messages

=back

B<spewing_longmess>

=over

B<Definition:> delegated method from the class used to understand the current state
the longmess concatenation for error messages

=back

=back
Expand Down Expand Up @@ -681,6 +713,8 @@ L<Spreadsheet::XLSX::Reader::LibXML::ParseExcelFormatStrings//set_date_behavior>

L<Spreadsheet::XLSX::Reader::LibXML::ParseExcelFormatStrings//get_date_behavior>

L<Spreadsheet::XLSX::Reader::LibXML::ParseExcelFormatStrings//set_european_first>

=back

=back
Expand Down
2 changes: 1 addition & 1 deletion dist.ini
Expand Up @@ -53,7 +53,7 @@ repository.url = https:%a/%r.git
repository.web = https:%a/%r
repository.type = git

[ContributorsFromGit]
;[ContributorsFromGit]

[MetaYAML]

Expand Down

0 comments on commit c1e061b

Please sign in to comment.