@@ -1,5 +1,66 @@
Revision history for Perl module Spreadsheet::ParseExcel.
+0.65 March 15 2014
+ ! Merge support for accessing hyperlink data
+
+0.64 March 11 2014
+
+ ! RT #47072 (ExcelLocaltime rounding)
+ http://rt.cpan.org/Public/Bug/Display.html?id=47072
+
+ ! RT #93142 (date format w/commas)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93142
+
+ ! RT #93651 (Update metadata)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93651
+
+0.63 March 7 2014
+
+ ! RT #12946 (IO::Wrap)
+ http://rt.cpan.org/Public/Bug/Display.html?id=12946
+
+ ! RT #93065 (auto color)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93065
+
+0.62
+
+ ! Fix test 46 skip_all plan logic.
+ From CPAN testers.
+
+ ! RT #52830 (0x00 general fmt) && fix test.
+ http://rt.cpan.org/Public/Bug/Display.html?id=52830
+
+ ! RT #93138 (undefined value as ARRAY)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93138
+
+0.61
+
+ ! RT #93500 (Red Cell formats)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93500
+
+ + RT #93379 (tab color)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93379
+
+ + RT #93393 (active worksheet)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93393
+
+ ! Fix RT #93425 (color from workbook leaks)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93425
+
+ + RT #93367 (hidden rows/columns)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93367
+
+ ! Fix RT #93065 (black is white)
+ http://rt.cpan.org/Public/Bug/Display.html?id=93065
+
+ ! Fix RT #62593 (?)(merge from apla/master).
+ http://rt.cpan.org/Public/Bug/Display.html?id=62593
+
+0.60 February 26 2014
+
+ + Fix RT #43250
+ http://rt.cpan.org/Public/Bug/Display.html?id=43250
+
0.59 April 6 2011
+ Patch for decryption of default encrypted workbooks from
@@ -13,6 +13,7 @@ t/03_regression.t
t/04_regression.t
t/05_regression.t
t/06_regression.t
+t/07_cell_handler.t
t/10_error_codes.t
t/11_encryption.t
t/20_number_format_default.t
@@ -24,6 +25,7 @@ t/25_decode_rk_numbers.t
t/26_localtime2excel.t
t/27_localtime2excel.t
t/28_int2col.t
+t/29_active_sheet.t
t/30_sst_01.t
t/32_charts.t
t/41_test95-97j.t
@@ -31,6 +33,8 @@ t/42_test95-97j-2.t
t/43_test2000J.t
t/44_oem.t
t/45_oem-2.t
+t/46_save_parser.t
+t/47_hyperlinks.t
t/90_pod.t
t/91_minimumversion.t
t/92_meta.t
@@ -60,6 +64,7 @@ t/excel_files/pers-encrypted-RC4-pass-11.xls
t/excel_files/pers-encrypted-def-pass-QwErTyUiOp.xls
t/excel_files/pers-protected.xls
t/excel_files/worksheet_01.xls
+t/excel_files/TestActiveSheet.xls
lib/Spreadsheet/ParseExcel.pm
lib/Spreadsheet/ParseExcel/Cell.pm
@@ -112,3 +117,4 @@ sample/dmpEx_2xml.pl
sample/parse.pl
+META.json Module JSON meta-data (added by MakeMaker)
@@ -0,0 +1,56 @@
+{
+ "abstract" : "Read information from an Excel file.",
+ "author" : [
+ "Douglas Wilson (dougw@cpan.org)"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.133380",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Spreadsheet-ParseExcel",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Crypt::RC4" : "0",
+ "Digest::Perl::MD5" : "0",
+ "IO::File" : "0",
+ "IO::Scalar" : "0",
+ "OLE::Storage_Lite" : "0.19",
+ "Scalar::Util" : "0"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "http://github.com/runrig/spreadsheet-parseexcel/issues"
+ },
+ "homepage" : "http://github.com/runrig/spreadsheet-parseexcel/",
+ "repository" : {
+ "url" : "http://github.com/runrig/spreadsheet-parseexcel"
+ },
+ "x_MailingList" : "http://groups.google.com/group/spreadsheet-parseexcel"
+ },
+ "version" : "0.65"
+}
@@ -1,30 +1,32 @@
---- #YAML:1.0
-name: Spreadsheet-ParseExcel
-version: 0.59
-abstract: Read information from an Excel file.
+---
+abstract: 'Read information from an Excel file.'
author:
- - John McNamara (jmcnamara@cpan.org)
-license: perl
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
+ - 'Douglas Wilson (dougw@cpan.org)'
build_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.133380'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Spreadsheet-ParseExcel
+no_index:
+ directory:
+ - t
+ - inc
requires:
- Crypt::RC4: 0
- Digest::Perl::MD5: 0
- IO::File: 0
- IO::Scalar: 0
- OLE::Storage_Lite: 0.19
- Scalar::Util: 0
+ Crypt::RC4: '0'
+ Digest::Perl::MD5: '0'
+ IO::File: '0'
+ IO::Scalar: '0'
+ OLE::Storage_Lite: '0.19'
+ Scalar::Util: '0'
resources:
- MailingList: http://groups.google.com/group/spreadsheet-parseexcel
- repository: http://github.com/jmcnamara/spreadsheet-parseexcel
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.54
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ MailingList: http://groups.google.com/group/spreadsheet-parseexcel
+ bugtracker: http://github.com/runrig/spreadsheet-parseexcel/issues
+ homepage: http://github.com/runrig/spreadsheet-parseexcel/
+ repository: http://github.com/runrig/spreadsheet-parseexcel
+version: '0.65'
@@ -15,12 +15,14 @@ my %deps = (
);
my %resources = (
- repository => 'http://github.com/jmcnamara/spreadsheet-parseexcel',
+ homepage => 'http://github.com/runrig/spreadsheet-parseexcel/',
+ repository => 'http://github.com/runrig/spreadsheet-parseexcel',
+ bugtracker => 'http://github.com/runrig/spreadsheet-parseexcel/issues',
MailingList => 'http://groups.google.com/group/spreadsheet-parseexcel',
);
my %params = (
- 'AUTHOR' => 'John McNamara (jmcnamara@cpan.org)',
+ 'AUTHOR' => 'Douglas Wilson (dougw@cpan.org)',
'NAME' => 'Spreadsheet::ParseExcel',
'ABSTRACT' => 'Read information from an Excel file.',
'VERSION_FROM' => 'lib/Spreadsheet/ParseExcel.pm',
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/examples/a_simple_parser.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/examples/a_simple_parser.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/examples/display_text_table.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/examples/display_text_table.pl
old mode 100644
new mode 100755
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Cell;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -18,7 +19,7 @@ package Spreadsheet::ParseExcel::Cell;
use strict;
use warnings;
-our $VERSION = '0.59';
+our $VERSION = '0.65';
###############################################################################
#
@@ -140,11 +141,33 @@ sub get_rich_text {
###############################################################################
#
+# get_hyperlink {
+#
+# Returns an array ref of hyperlink information if the cell contains a hyperlink.
+# Returns undef otherwise
+#
+# [0] : Description of link (You may want $cell->value, as it will have rich text)
+# [1] : URL - the link expressed as a URL. N.B. relative URLs will be defaulted to
+# the directory of the input file, if the input file name is known. Otherwise
+# %REL% will be inserted as a place-holder. Depending on your application,
+# you should either remove %REL% or replace it with the appropriate path.
+# [2] : Target frame (or undef if none)
+
+sub get_hyperlink {
+ my $self = shift;
+
+ return $self->{Hyperlink} if exists $self->{Hyperlink};
+ return undef;
+}
+
+#
+###############################################################################
+#
# Mapping between legacy method names and new names.
#
{
no warnings; # Ignore warnings about variables used only once.
- *Value = *value;
+ *Value = \&value;
}
1;
@@ -176,6 +199,7 @@ The following Cell methods are available:
$cell->encoding()
$cell->is_merged()
$cell->get_rich_text()
+ $cell->get_hyperlink()
=head2 value()
@@ -267,6 +291,25 @@ The return value is an arrayref of arrayrefs in the form:
Returns undef if the property isn't set.
+=head2 get_hyperlink()
+
+If a cell contains a hyperlink, the C<get_hyperlink()> method returns an array ref of information about it.
+
+A cell can contain at most one hyperlink. If it does, it contains no other value.
+
+Otherwise, it returns undef;
+
+The array contains:
+
+=over
+
+=item * 0: Description (what's displayed); undef if not present
+
+=item * 1: Link, converted to an appropriate URL - Note: Relative links are based on the input file. %REL% is used if the input file is unknown (e.g. a file handle or scalar)
+
+=item * 2: Target - target frame (or undef if none)
+
+=back
=head1 Dates and Time in Excel
@@ -293,7 +336,9 @@ For date conversions using the CPAN C<DateTime> framework see L<DateTime::Format
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -301,7 +346,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Dump;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -18,7 +19,7 @@ package Spreadsheet::ParseExcel::Dump;
use strict;
use warnings;
-our $VERSION = '0.59';
+our $VERSION = '0.65';
my %NameTbl = (
@@ -333,7 +334,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -341,7 +344,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::FmtDefault;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -19,18 +20,18 @@ use strict;
use warnings;
use Spreadsheet::ParseExcel::Utility qw(ExcelFmt);
-our $VERSION = '0.59';
+our $VERSION = '0.65';
my %hFmtDefault = (
- 0x00 => '@',
+ 0x00 => 'General',
0x01 => '0',
0x02 => '0.00',
0x03 => '#,##0',
0x04 => '#,##0.00',
0x05 => '($#,##0_);($#,##0)',
- 0x06 => '($#,##0_);[RED]($#,##0)',
+ 0x06 => '($#,##0_);[Red]($#,##0)',
0x07 => '($#,##0.00_);($#,##0.00_)',
- 0x08 => '($#,##0.00_);[RED]($#,##0.00_)',
+ 0x08 => '($#,##0.00_);[Red]($#,##0.00_)',
0x09 => '0%',
0x0A => '0.00%',
0x0B => '0.00E+00',
@@ -48,9 +49,9 @@ my %hFmtDefault = (
#0x17-0x24 -- Differs in Natinal
0x25 => '(#,##0_);(#,##0)',
- 0x26 => '(#,##0_);[RED](#,##0)',
+ 0x26 => '(#,##0_);[Red](#,##0)',
0x27 => '(#,##0.00);(#,##0.00)',
- 0x28 => '(#,##0.00);[RED](#,##0.00)',
+ 0x28 => '(#,##0.00);[Red](#,##0.00)',
0x29 => '_(*#,##0_);_(*(#,##0);_(*"-"_);_(@_)',
0x2A => '_($*#,##0_);_($*(#,##0);_(*"-"_);_(@_)',
0x2B => '_(*#,##0.00_);_(*(#,##0.00);_(*"-"??_);_(@_)',
@@ -200,7 +201,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -208,7 +211,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -7,7 +7,8 @@ use utf8;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -21,18 +22,18 @@ use warnings;
use Encode qw(find_encoding decode);
use base 'Spreadsheet::ParseExcel::FmtDefault';
-our $VERSION = '0.59';
+our $VERSION = '0.65';
my %FormatTable = (
- 0x00 => '@',
+ 0x00 => 'General',
0x01 => '0',
0x02 => '0.00',
0x03 => '#,##0',
0x04 => '#,##0.00',
0x05 => '(\\#,##0_);(\\#,##0)',
- 0x06 => '(\\#,##0_);[RED](\\#,##0)',
+ 0x06 => '(\\#,##0_);[Red](\\#,##0)',
0x07 => '(\\#,##0.00_);(\\#,##0.00_)',
- 0x08 => '(\\#,##0.00_);[RED](\\#,##0.00_)',
+ 0x08 => '(\\#,##0.00_);[Red](\\#,##0.00_)',
0x09 => '0%',
0x0A => '0.00%',
0x0B => '0.00E+00',
@@ -60,9 +61,9 @@ my %FormatTable = (
#0x17-0x24 -- Differs in Natinal
0x25 => '(#,##0_);(#,##0)',
- 0x26 => '(#,##0_);[RED](#,##0)',
+ 0x26 => '(#,##0_);[Red](#,##0)',
0x27 => '(#,##0.00);(#,##0.00)',
- 0x28 => '(#,##0.00);[RED](#,##0.00)',
+ 0x28 => '(#,##0.00);[Red](#,##0.00)',
0x29 => '_(*#,##0_);_(*(#,##0);_(*"-"_);_(@_)',
0x2A => '_(\\*#,##0_);_(\\*(#,##0);_(*"-"_);_(@_)',
0x2B => '_(*#,##0.00_);_(*(#,##0.00);_(*"-"??_);_(@_)',
@@ -189,7 +190,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -197,7 +200,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::FmtJapan2;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -21,7 +22,7 @@ use warnings;
use Jcode;
use Unicode::Map;
use base 'Spreadsheet::ParseExcel::FmtJapan';
-our $VERSION = '0.59';
+our $VERSION = '0.65';
#------------------------------------------------------------------------------
# new (for Spreadsheet::ParseExcel::FmtJapan2)
@@ -82,7 +83,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -90,7 +93,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::FmtUnicode;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -21,7 +22,7 @@ use warnings;
use Unicode::Map;
use base 'Spreadsheet::ParseExcel::FmtDefault';
-our $VERSION = '0.59';
+our $VERSION = '0.65';
#------------------------------------------------------------------------------
# new (for Spreadsheet::ParseExcel::FmtUnicode)
@@ -83,7 +84,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -91,7 +94,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Font;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -18,7 +19,7 @@ package Spreadsheet::ParseExcel::Font;
use strict;
use warnings;
-our $VERSION = '0.59';
+our $VERSION = '0.65';
sub new {
my ( $class, %rhIni ) = @_;
@@ -47,7 +48,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -55,7 +58,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Format;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -18,7 +19,7 @@ package Spreadsheet::ParseExcel::Format;
use strict;
use warnings;
-our $VERSION = '0.59';
+our $VERSION = '0.65';
sub new {
my ( $class, %rhIni ) = @_;
@@ -47,7 +48,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -55,7 +58,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::SaveParser::Workbook;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -19,7 +20,7 @@ use strict;
use warnings;
use base 'Spreadsheet::ParseExcel::Workbook';
-our $VERSION = '0.59';
+our $VERSION = '0.65';
#==============================================================================
# Spreadsheet::ParseExcel::SaveParser::Workbook
@@ -156,12 +157,12 @@ sub SaveAs {
$oWrS->protect();
}
}
- if ( ( $oWkS->{FitWidth} == 1 ) and ( $oWkS->{FitHeight} == 1 ) ) {
+ if ( $oWkS->{Scale} != 100 ) {
# Pages on fit with width and Heigt
$oWrS->fit_to_pages( $oWkS->{FitWidth}, $oWkS->{FitHeight} );
- #Print Scale
+ #Print Scale and reset FitWidth/FitHeight
$oWrS->set_print_scale( $oWkS->{Scale} );
}
else {
@@ -232,7 +233,7 @@ sub SaveAs {
# PageStart => $oWkS->{PageStart}, # Page number for start
# UsePage => $oWkS->{UsePage}, # Use own start page number
-# NoColor => $oWkS->{NoColor}, # Print in blcak-white
+# NoColor => $oWkS->{NoColor}, # Print in black-white
# Draft => $oWkS->{Draft}, # Print in draft mode
# Notes => $oWkS->{Notes}, # Print notes
# LeftToRight => $oWkS->{LeftToRight}, # Left to Right
@@ -254,7 +255,16 @@ sub SaveAs {
}
}
}
- for (
+
+ my $merged_areas = $oWkS->get_merged_areas();
+ my $merged_areas_h = {};
+ if ($merged_areas) {
+ foreach my $range (@$merged_areas) {
+ $merged_areas_h->{$range->[0]}{$range->[1]} = $range;
+ }
+ }
+
+ for (
my $iR = $oWkS->{MinRow} ;
defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ;
$iR++
@@ -270,13 +280,11 @@ sub SaveAs {
my $oWkC = $oWkS->{Cells}[$iR][$iC];
if ($oWkC) {
- if ( $oWkC->{Merged} ) {
+ if ( $oWkC->{Merged} and exists $merged_areas_h->{$iR}{$iC} ) {
my $oFmtN = $oWrEx->addformat();
$oFmtN->copy( $hFmt{ $oWkC->{FormatNo} } );
- $oFmtN->set_merge(1);
- $oWrS->write(
- $iR,
- $iC,
+ $oWrS->merge_range (
+ @{$merged_areas_h->{$iR}{$iC}},
$oBook->{FmtClass}
->TextFmt( $oWkC->{Val}, $oWkC->{Code} ),
$oFmtN
@@ -378,7 +386,8 @@ sub AddFormat {
sub AddCell {
my ( $oBook, $iSheet, $iR, $iC, $sVal, $oCell, $sCode ) = @_;
my %rhKey;
- $oCell ||= 0;
+ $oCell ||= $oBook->{Worksheet}[$iSheet]
+ ->{Cells}[$iR][$iC]->{FormatNo} || 0;
my $iFmt =
( UNIVERSAL::isa( $oCell, 'Spreadsheet::ParseExcel::Cell' ) )
? $oCell->{FormatNo}
@@ -389,9 +398,22 @@ sub AddCell {
$rhKey{Val} = $sVal;
$rhKey{Code} = $sCode || '_native_';
$oBook->{_CurSheet} = $iSheet;
+
+ my $merged_areas = $oBook->{Worksheet}[$iSheet]->get_merged_areas();
+ my $merged_areas_h = {};
+ if ($merged_areas) {
+ foreach my $range (@$merged_areas) {
+ $merged_areas_h->{$range->[0]}{$range->[1]} = $range;
+ }
+ }
+
my $oNewCell =
Spreadsheet::ParseExcel::_NewCell( $oBook, $iR, $iC, %rhKey );
Spreadsheet::ParseExcel::_SetDimension( $oBook, $iR, $iC, $iC );
+
+ $oNewCell->{Merged} = 1
+ if exists $merged_areas_h->{$iR}{$iC};
+
return $oNewCell;
}
@@ -415,7 +437,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -423,7 +447,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::SaveParser::Worksheet;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -23,7 +24,7 @@ use warnings;
#==============================================================================
use base 'Spreadsheet::ParseExcel::Worksheet';
-our $VERSION = '0.59';
+our $VERSION = '0.65';
sub new {
my ( $sClass, %rhIni ) = @_;
@@ -35,7 +36,8 @@ sub new {
#------------------------------------------------------------------------------
sub AddCell {
my ( $oSelf, $iR, $iC, $sVal, $oCell, $sCode ) = @_;
- $oSelf->{_Book}
+
+ $oSelf->{_Book}
->AddCell( $oSelf->{_SheetNo}, $iR, $iC, $sVal, $oCell, $sCode );
}
@@ -70,7 +72,9 @@ This module is used in conjunction with Spreadsheet::ParseExcel. See the documen
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -78,7 +82,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::SaveParser;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -24,7 +25,7 @@ use Spreadsheet::ParseExcel::SaveParser::Worksheet;
use Spreadsheet::WriteExcel;
use base 'Spreadsheet::ParseExcel';
-our $VERSION = '0.59';
+our $VERSION = '0.65';
###############################################################################
#
@@ -48,7 +49,7 @@ sub Create {
my $workbook = Spreadsheet::ParseExcel::Workbook->new();
$workbook->{SheetCount} = 0;
- # User specified formater class.
+ # User specified formatter class.
if ($formatter) {
$workbook->{FmtClass} = $formatter;
}
@@ -288,7 +289,9 @@ Only last print area will remain. (Others will be removed)
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -296,7 +299,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Utility;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -24,7 +25,7 @@ use vars qw(@ISA @EXPORT_OK);
@EXPORT_OK = qw(ExcelFmt LocaltimeExcel ExcelLocaltime
col2int int2col sheetRef xls2csv);
-our $VERSION = '0.59';
+our $VERSION = '0.65';
my $qrNUMBER = qr/(^[+-]?\d+(\.\d+)?$)|(^[+-]?\d+\.?(\d*)[eE][+-](\d+))$/;
@@ -180,13 +181,13 @@ sub ExcelFmt {
# We don't use the colour but we return it to the caller.
#
my $color = '';
- if ( $format =~ s/^(\[[A-Z][a-z]{2,}(\d{1,2})?\])// ) {
+ if ( $format =~ s/^(\[[A-Za-z]{3,}(\d{1,2})?\])// ) {
$color = $1;
}
# Remove the locale, such as [$-409], from the format string.
my $locale = '';
- if ( $format =~ s/^(\[\$?-\d+\])// ) {
+ if ( $format =~ s/^(\[\$?-F?\d+\])// ) {
$locale = $1;
}
@@ -584,8 +585,7 @@ sub ExcelFmt {
# Replace the placeholders in the template such as yyyy mm dd with
# actual numbers or strings.
my $replacement;
- for ( my $i = @placeholders - 1 ; $i >= 0 ; $i-- ) {
- my $placeholder = $placeholders[$i];
+ for my $placeholder ( reverse @placeholders ) {
if ( $placeholder->[-1] eq 'minutes' ) {
@@ -736,6 +736,9 @@ sub ExcelFmt {
# Text format.
$replacement = $number;
}
+ elsif ( $placeholder->[0] eq ',' ) {
+ next;
+ }
# Substitute the replacement string back into the template.
substr( $result, $placeholder->[1], $placeholder->[2],
@@ -1120,6 +1123,10 @@ sub LocaltimeExcel {
return $iTime;
}
+my @month_days = qw(
+ 0 31 28 31 30 31 30 31 31 30 31 30 31
+);
+
#------------------------------------------------------------------------------
# ExcelLocaltime (for Spreadsheet::ParseExcel::Utility)
#------------------------------------------------------------------------------
@@ -1127,7 +1134,7 @@ sub ExcelLocaltime {
my ( $dObj, $flg1904 ) = @_;
my ( $iSec, $iMin, $iHour, $iDay, $iMon, $iYear, $iwDay, $iMSec );
- my ( $iDt, $iTime, $iYDays );
+ my ( $iDt, $iTime, $iYDays, $iMD );
$iDt = int($dObj);
$iTime = $dObj - $iDt;
@@ -1153,33 +1160,42 @@ sub ExcelLocaltime {
}
$iYear -= 1900; # Localtime year is relative to 1900.
- for ( $iMon = 1 ; $iMon < 12 ; $iMon++ ) {
- my $iMD;
- if ( $iMon == 1
- || $iMon == 3
- || $iMon == 5
- || $iMon == 7
- || $iMon == 8
- || $iMon == 10
- || $iMon == 12 )
- {
- $iMD = 31;
- }
- elsif ( $iMon == 4 || $iMon == 6 || $iMon == 9 || $iMon == 11 ) {
- $iMD = 30;
- }
- elsif ( $iMon == 2 ) {
- $iMD = ( ( $iYear % 4 ) == 0 ) ? 29 : 28;
- }
+ for ( $iMon = 1 ; $iMon <= 12 ; $iMon++ ) {
+ $iMD = $month_days[$iMon];
+ $iMD++ if $iMon == 2 and $iYear % 4 == 0;
+
last if ( $iDt <= $iMD );
$iDt -= $iMD;
}
- $iMon -= 1; # Localtime month is 0 based.
-
#2. Calc Time
$iDay = $iDt;
$iTime += ( 0.0005 / 86400.0 );
+ if ($iTime >= 1.0)
+ {
+ $iTime -= int($iTime);
+ $iwDay = ($iwDay == 6) ? 0 : $iwDay + 1;
+ if ($iDay == $iMD)
+ {
+ if ($iMon == 12)
+ {
+ $iMon = 1;
+ $iYear++;
+ }
+ else
+ {
+ $iMon++;
+ }
+ $iDay = 1;
+ }
+ else
+ {
+ $iDay++;
+ }
+ }
+
+ # Localtime month is 0 based.
+ $iMon -= 1;
$iTime *= 24.0;
$iHour = int($iTime);
$iTime -= $iHour;
@@ -1594,7 +1610,9 @@ See also the following xls2csv utilities: Ken Prows' C<xls2csv>: http://search.c
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -1602,7 +1620,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Workbook;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -18,7 +19,7 @@ package Spreadsheet::ParseExcel::Workbook;
use strict;
use warnings;
-our $VERSION = '0.59';
+our $VERSION = '0.65';
###############################################################################
#
@@ -33,6 +34,14 @@ sub new {
}
###############################################################################
+sub color_idx_to_rgb {
+ my( $workbook, $iidx ) = @_;
+
+ my $palette = $workbook->{aColor};
+ return ( ( defined $palette->[$iidx] ) ? $palette->[$iidx] : $palette->[0] );
+}
+
+###############################################################################
#
# worksheet()
#
@@ -54,7 +63,7 @@ sub worksheet {
#
# worksheets()
#
-# Returns an array ofWorksheet objects.
+# Returns an array of Worksheet objects.
#
sub worksheets {
my $self = shift;
@@ -142,12 +151,25 @@ sub ParseAbort {
$self->{_ParseAbort} = $val;
}
+=head2 get_active_sheet()
+
+Return the number of the active (open) worksheet (at the time the workbook
+was saved. May return undef.
+
+=cut
+
+sub get_active_sheet {
+ my $workbook = shift;
+
+ return $workbook->{ActiveSheet};
+}
+
###############################################################################
#
# Parse(). Deprecated.
#
# Syntactic wrapper around Spreadsheet::ParseExcel::Parse().
-# This method is *deprecated* since it doesn't conform to the the current
+# This method is *deprecated* since it doesn't conform to the current
# error handling in the S::PE Parse() method.
#
sub Parse {
@@ -276,7 +298,9 @@ Returns 0 if the 1900 epoch is in use.
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -284,7 +308,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -6,7 +6,8 @@ package Spreadsheet::ParseExcel::Worksheet;
#
# Used in conjunction with Spreadsheet::ParseExcel.
#
-# Copyright (c) 2009 John McNamara
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
# Copyright (c) 2006-2008 Gabor Szabo
# Copyright (c) 2000-2006 Kawai Takanori
#
@@ -19,7 +20,7 @@ use strict;
use warnings;
use Scalar::Util qw(weaken);
-our $VERSION = '0.59';
+our $VERSION = '0.65';
###############################################################################
#
@@ -179,26 +180,34 @@ sub get_merged_areas {
#
# get_row_heights()
#
-# Returns an array_ref of row heights.
+# Returns an array of row heights.
#
sub get_row_heights {
my $self = shift;
- return @{ $self->{RowHeight} };
+ if ( wantarray() ) {
+ return unless $self->{RowHeight};
+ return @{ $self->{RowHeight} };
+ }
+ return $self->{RowHeight};
}
###############################################################################
#
# get_col_widths()
#
-# Returns an array_ref of column widths.
+# Returns an array of column widths.
#
sub get_col_widths {
my $self = shift;
- return @{ $self->{ColWidth} };
+ if ( wantarray() ) {
+ return unless $self->{ColWidth};
+ return @{ $self->{ColWidth} };
+ }
+ return $self->{ColWidth};
}
###############################################################################
@@ -540,6 +549,74 @@ sub is_print_comments {
return $self->{Notes};
}
+=head2 get_tab_color()
+
+Return color index of tab, or undef if not set.
+
+=cut
+
+sub get_tab_color {
+ my $worksheet = shift;
+
+ return $worksheet->{TabColor};
+}
+
+=head2 is_sheet_hidden()
+
+Return true if sheet is hidden
+
+=cut
+
+sub is_sheet_hidden {
+ my $worksheet = shift;
+
+ return $worksheet->{SheetHidden};
+}
+
+=head2 is_row_hidden($row)
+
+In scalar context, return true if $row is hidden
+In array context, return an array whose elements are true
+if the corresponding row is hidden.
+
+=cut
+
+sub is_row_hidden {
+ my $worksheet = shift;
+
+ my ($row) = @_;
+
+ unless ( $worksheet->{RowHidden} ) {
+ return () if (wantarray);
+ return 0;
+ }
+
+ return @{ $worksheet->{RowHidden} } if (wantarray);
+ return $worksheet->{RowHidden}[$row];
+}
+
+=head2 is_col_hidden($col)
+
+In scalar context, return true if $col is hidden
+In array context, return an array whose elements are true
+if the corresponding column is hidden.
+
+=cut
+
+sub is_col_hidden {
+ my $worksheet = shift;
+
+ my ($col) = @_;
+
+ unless ( $worksheet->{ColHidden} ) {
+ return () if (wantarray);
+ return 0;
+ }
+
+ return @{ $worksheet->{ColHidden} } if (wantarray);
+ return $worksheet->{ColHidden}[$col];
+}
+
###############################################################################
#
# Mapping between legacy method names and new names.
@@ -667,7 +744,8 @@ Returns C<undef> if there are no merged areas.
=head2 get_row_heights()
-The C<get_row_heights()> method returns an array_ref of row heights.
+The C<get_row_heights()> method returns an array_ref of row heights in scalar context,
+and an array in list context.
my $row_heights = $worksheet->get_row_heights();
@@ -676,7 +754,8 @@ Returns C<undef> if the property isn't set.
=head2 get_col_widths()
-The C<get_col_widths()> method returns an array_ref of column widths.
+The C<get_col_widths()> method returns an array_ref of column widths in scalar context,
+and an array in list context.
my $col_widths = $worksheet->get_col_widths();
@@ -844,7 +923,7 @@ The C<get_print_order()> method returns 0 if the worksheet print "page order" is
=head2 get_print_scale()
-The C<get_print_scale()> method returns the workbook scale for printing. The print scale fctor can be in the range 10 .. 400.
+The C<get_print_scale()> method returns the workbook scale for printing. The print scale factor can be in the range 10 .. 400.
my $print_scale = $worksheet->get_print_scale();
@@ -934,7 +1013,9 @@ Returns 0 if the property isn't set.
=head1 AUTHOR
-Maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -942,7 +1023,9 @@ Original author: Kawai Takanori kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2010 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
@@ -4,7 +4,10 @@ package Spreadsheet::ParseExcel;
#
# Spreadsheet::ParseExcel - Extract information from an Excel file.
#
-# Copyright 2000-2008, Takanori Kawai
+# Copyright (c) 2014 Douglas Wilson
+# Copyright (c) 2009-2013 John McNamara
+# Copyright (c) 2006-2008 Gabor Szabo
+# Copyright (c) 2000-2008 Takanori Kawai
#
# perltidy with standard settings.
#
@@ -16,13 +19,14 @@ use warnings;
use 5.008;
use OLE::Storage_Lite;
+use File::Basename qw(fileparse);
use IO::File;
use Config;
use Crypt::RC4;
use Digest::Perl::MD5;
-our $VERSION = '0.59';
+our $VERSION = '0.65';
use Spreadsheet::ParseExcel::Workbook;
use Spreadsheet::ParseExcel::Worksheet;
@@ -31,10 +35,11 @@ use Spreadsheet::ParseExcel::Format;
use Spreadsheet::ParseExcel::Cell;
use Spreadsheet::ParseExcel::FmtDefault;
+my $currentbook;
my @aColor = (
'000000', # 0x00
'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF',
- 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', # 0x08
+ 'FFFFFF', 'FFFFFF', 'FFFFFF', '000000', # 0x08
'FFFFFF', 'FF0000', '00FF00', '0000FF',
'FFFF00', 'FF00FF', '00FFFF', '800000', # 0x10
'008000', '000080', '808000', '800080',
@@ -48,7 +53,7 @@ my @aColor = (
'33CCCC', '99CC00', 'FFCC00', 'FF9900',
'FF6600', '666699', '969696', '003366', # 0x38
'339966', '003300', '333300', '993300',
- '993366', '333399', '333333', 'FFFFFF' # 0x40
+ '993366', '333399', '333333', '000000' # 0x40
);
use constant verExcel95 => 0x500;
use constant verExcel97 => 0x600;
@@ -72,6 +77,9 @@ use constant ErrorNoFile => 1;
use constant ErrorNoExcelData => 2;
use constant ErrorFileEncrypted => 3;
+# Color index for the 'auto' color
+use constant AutoColor => 64;
+
our %error_strings = (
ErrorNone, '', # 0
ErrorNoFile, 'File not found', # 1
@@ -97,8 +105,11 @@ our %ProcTbl = (
0x2A => \&_subPrintHeaders, # Print Headers
0x2B => \&_subPrintGridlines, # Print Gridlines
0x3C => \&_subContinue, # Continue
+ 0x3D => \&_subWindow1, # Window1
0x43 => \&_subXF, # XF for Excel < 4.
0x0443 => \&_subXF, # XF for Excel = 4.
+ 0x862 => \&_subSheetLayout, # Sheet Layout
+ 0x1B8 => \&_subHyperlink, # HYPERLINK
#Develpers' Kit P292
0x55 => \&_subDefColWidth, # Consider
@@ -155,9 +166,6 @@ our %ProcTbl = (
our $BIGENDIAN;
our $PREFUNC;
-our $_CellHandler;
-our $_NotSetCell;
-our $_Object;
our $_use_perlio;
#------------------------------------------------------------------------------
@@ -201,9 +209,9 @@ sub new {
$self->SetEventHandler( $sKey, $hParam{AddHandlers}->{$sKey} );
}
}
- $_CellHandler = $hParam{CellHandler} if ( $hParam{CellHandler} );
- $_NotSetCell = $hParam{NotSetCell};
- $_Object = $hParam{Object};
+ $self->{CellHandler} = $hParam{CellHandler};
+ $self->{NotSetCell} = $hParam{NotSetCell};
+ $self->{Object} = $hParam{Object};
if ( defined $hParam{Password} ) {
@@ -515,7 +523,12 @@ sub parse {
my ( $self, $source, $formatter ) = @_;
my $workbook = Spreadsheet::ParseExcel::Workbook->new();
+ $currentbook = $workbook;
$workbook->{SheetCount} = 0;
+ $workbook->{CellHandler} = $self->{CellHandler};
+ $workbook->{NotSetCell} = $self->{NotSetCell};
+ $workbook->{Object} = $self->{Object};
+ $workbook->{aColor} = [ @aColor ];
my ( $biff_data, $data_length ) = $self->_get_content( $source, $workbook );
return undef if not $biff_data;
@@ -581,9 +594,23 @@ sub parse {
$PREFUNC = $record if ( $record != 0x3C ); #Not Continue
- return $workbook if defined $workbook->{_ParseAbort};
+ last if defined $workbook->{_ParseAbort};
}
+ foreach my $worksheet (@{$workbook->{Worksheet}} ) {
+ # Install hyperlinks into each cell
+ # Range is undocumented for user; allows reuse of data
+
+ if ($worksheet->{HyperLinks}) {
+ foreach my $link (@{$worksheet->{HyperLinks}}) {
+ for( my $row = $link->[3]; $row <= $link->[4]; $row++ ) {
+ for( my $col = $link->[5]; $col <= $link->[6]; $col++ ) {
+ $worksheet->{Cells}[$row][$col]{Hyperlink} = $link;
+ }
+ }
+ }
+ }
+ }
return $workbook;
}
@@ -600,33 +627,52 @@ sub _get_content {
# Reset the error status in case method is called more than once.
$self->{_error_status} = ErrorNone;
+
+ my $ref = ref($source);
- if ( ref( $source ) eq "SCALAR" ) {
+ if ( $ref ) {
+ if ( $ref eq 'SCALAR' ) {
- # Specified by a scalar buffer.
- ( $biff_data, $data_length ) = $self->{GetContent}->( $source );
+ # Specified by a scalar buffer.
+ ( $biff_data, $data_length ) = $self->{GetContent}->( $source );
- }
- elsif ( ( ref( $source ) =~ /GLOB/ ) || ( ref( $source ) eq 'Fh' ) ) {
+ }
+ elsif ( $ref eq 'ARRAY' ) {
- # For CGI.pm (Light FileHandle)
- binmode( $source );
- my $sWk;
- my $sBuff = '';
-
- while ( read( $source, $sWk, 4096 ) ) {
- $sBuff .= $sWk;
+ # Specified by file content
+ $workbook->{File} = undef;
+ my $sData = join( '', @$source );
+ ( $biff_data, $data_length ) = $self->{GetContent}->( \$sData );
}
+ else {
- ( $biff_data, $data_length ) = $self->{GetContent}->( \$sBuff );
+ # Assume filehandle
- }
- elsif ( ref( $source ) eq 'ARRAY' ) {
+ # For CGI.pm (Light FileHandle)
+ my $sBuff = '';
+ if ( eval { binmode( $source ) } ) {
+ my $sWk;
+
+ while ( read( $source, $sWk, 4096 ) ) {
+ $sBuff .= $sWk;
+ }
+ }
+ else {
+
+ # Assume IO::Wrap or some other filehandle-like OO-only object
+ my $sWk;
+
+ # IO::Wrap does not implement binmode
+ eval { $source->binmode() };
+
+ while ( $source->read( $sWk, 4096 ) ) {
+ $sBuff .= $sWk;
+ }
+ }
+
+ ( $biff_data, $data_length ) = $self->{GetContent}->( \$sBuff );
- # Specified by file content
- $workbook->{File} = undef;
- my $sData = join( '', @$source );
- ( $biff_data, $data_length ) = $self->{GetContent}->( \$sData );
+ }
}
else {
@@ -1188,8 +1234,10 @@ sub _subRow {
unpack( "v8", $sWk );
$iEc--;
- # TODO. we need to handle hidden rows:
- # $iGr & 0x20
+ if ( $iGr & 0x20 ) {
+ $oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{RowHidden}[$iR] = 1;
+ }
+
$oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{RowHeight}[$iR] = $iHght / 20;
#2.MaxRow, MaxCol, MinRow, MinCol
@@ -1318,11 +1366,172 @@ sub _subColInfo {
$oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{ColFmtNo}[$i] = $iXF;
- # TODO. we need to handle hidden cols: $iGr & 0x01.
+ if ( $iGr & 0x01 ) {
+ $oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{ColHidden}[$i] = 1;
+ }
}
}
#------------------------------------------------------------------------------
+# _subWindow1 Window information P 273
+#------------------------------------------------------------------------------
+sub _subWindow1 {
+ my ( $workbook, $op, $len, $wk ) = @_;
+
+ return if ( $workbook->{BIFFVersion} <= verBIFF4() );
+
+ my (
+ $hpos, $vpos, $width,
+ $height, $options, $active,
+ $firsttab, $numselected, $tabbarwidth
+ ) = unpack( "v9", $wk );
+
+ $workbook->{ActiveSheet} = $active;
+}
+
+#------------------------------------------------------------------------------
+# _subSheetLayout OpenOffice 5.96 (P207)
+#------------------------------------------------------------------------------
+sub _subSheetLayout {
+ my ( $workbook, $op, $len, $wk ) = @_;
+
+ my @unused;
+ (
+ my $rc,
+ @unused[ 1 .. 10 ],
+ @unused[ 11 .. 14 ],
+ my $color, @unused[ 15, 16 ]
+ ) = unpack( "vC10C4vC2", $wk );
+
+ return unless ( $rc == 0x0862 );
+
+ $workbook->{Worksheet}[ $workbook->{_CurSheet} ]->{TabColor} = $color;
+}
+
+#------------------------------------------------------------------------------
+# _subHyperlink OpenOffice 5.96 (P182)
+#
+# Also see: http://msdn.microsoft.com/en-us/library/gg615407(v=office.14).aspx
+#------------------------------------------------------------------------------
+
+# Helper: Extract a GID, returns as text string
+
+sub _getguid {
+ my( $wk ) = @_;
+ my( $text, $guidl, $guids1, $guids2, @guidb );
+
+ ( $guidl, $guids1, $guids2, @guidb[0..7] ) = unpack( 'Vv2C8', $wk );
+
+ $text = sprintf( '%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X', $guidl, $guids1, $guids2, @guidb);
+ return $text;
+}
+
+# Helper: Extract a counted (16-bit) unicode string, returns string,
+# updates $offset
+# $zterm == 1 if string is null-terminated.
+# $bc if length is in bytes (not chars)
+
+sub _getustr {
+ my( $wk, $offset, $zterm, $bc ) = @_;
+
+ my $len = unpack( 'V', substr( $wk, $offset ) );
+ $offset += 4;
+
+ if( $bc ) {
+ $len /= 2;
+ }
+ $len -= $zterm;
+ my $text = join( '', map { chr $_ } unpack( "v$len", substr( $wk, $offset ) ) );
+ $text =~ s/\0.*\z// if( $zterm );
+ $_[1] = ( $offset += ($len + $zterm) *2 );
+ return $text;
+}
+
+# HYPERLINK record
+
+sub _subHyperlink {
+ my ( $workbook, $op, $len, $wk ) = @_;
+
+ # REF
+ my( $srow, $erow, $scol, $ecol ) = unpack( 'v4', $wk );
+
+ my $guid = _getguid( substr( $wk, 8 ) );
+ return unless( $guid eq '79EAC9D0-BAF9-11CE-8C82-00AA004BA90B' );
+
+ my( $stmvers, $flags ) = unpack( 'VV', substr( $wk, 24 ) );
+ return if( $flags & 0x60 || $stmvers != 2 );
+
+ my $offset = 32;
+ my( $desc,$frame, $link, $mark );
+
+ if( ($flags & 0x14) == 0x14 ) {
+ $desc = _getustr( $wk, $offset, 1, 0 );
+ }
+
+ if( $flags & 0x80 ) {
+ $frame = _getustr( $wk, $offset, 1, 0 );
+ }
+
+ $link = '';
+ if( $flags & 0x100 ) {
+ # UNC path
+ $link = 'file:///' . _getustr( $wk, $offset, 1, 0 );
+ } elsif( $flags & 0x1 ) {
+ # Has link (URI)
+ $guid = _getguid( substr( $wk, $offset ) );
+ $offset += 16;
+ if( $guid eq '79EAC9E0-BAF9-11CE-8C82-00AA004BA90B' ) {
+ # URI
+ $link = _getustr( $wk, $offset, 1, 1 );
+ } elsif( $guid eq '00000303-0000-0000-C000-000000000046' ) {
+ # Local file
+ $link = 'file:///';
+ # !($flags & 2) = 'relative path'
+ if( !($flags & 0x2) ) {
+ my $file = $workbook->{File};
+ if( defined $file && length $file ) {
+ $link .= (fileparse($file))[1];
+ }
+ else {
+ $link .= '%REL%'
+ }
+ }
+ my $dirn = unpack( 'v', substr( $wk, $offset ) );
+ $offset += 2;
+ $link .= '..\\' x $dirn;
+ my $namelen = unpack( 'V', substr( $wk, $offset ) );
+ $offset += 4;
+ my $name = unpack( 'Z*', substr( $wk, $offset ) );
+ $offset += $namelen;
+ $offset += 24;
+ my $size = unpack( 'V', substr( $wk, $offset ) );
+ $offset += 4;
+ if( $size ) {
+ my $xlen = unpack( 'V', substr( $wk, $offset ) ) / 2;
+ $name = join( '', map { chr $_} unpack( "v$xlen", substr( $wk, $offset+4+2) ) );
+ $offset += $size;
+ }
+ $link .= $name;
+ } else {
+ return;
+ }
+ }
+
+ # Text mark (Fragment identifier)
+ if( $flags & 0x8 ) {
+ # Cellrefs contain reserved characters, so url-encode
+ my $fragment = _getustr( $wk, $offset, 1 );
+ $fragment =~ s/([^\w.~-])/sprintf( '%%%02X', ord( $1 ) )/gems;
+ $link .= '#' . $fragment;
+ }
+
+ # Update loop at end of parse() if this changes
+
+ push @{ $workbook->{Worksheet}[ $workbook->{_CurSheet} ]->{HyperLinks} }, [
+ $desc, $link, $frame, $srow, $erow, $scol, $ecol ];
+}
+
+#------------------------------------------------------------------------------
# _subSST (for Spreadsheet::ParseExcel) DK:P413
#------------------------------------------------------------------------------
sub _subSST {
@@ -1592,7 +1801,7 @@ sub _subPalette {
for ( my $i = 0 ; $i < unpack( 'v', $sWk ) ; $i++ ) {
# push @aColor, unpack('H6', substr($sWk, $i*4+2));
- $aColor[ $i + 8 ] = unpack( 'H6', substr( $sWk, $i * 4 + 2 ) );
+ $oBook->{aColor}[ $i + 8 ] = unpack( 'H6', substr( $sWk, $i * 4 + 2 ) );
}
}
@@ -1683,11 +1892,12 @@ sub _subBoundSheet {
}
$oBook->{Worksheet}[ $oBook->{SheetCount} ] =
Spreadsheet::ParseExcel::Worksheet->new(
- Name => $sWsName,
- Kind => $iKind,
- _Pos => $iPos,
- _Book => $oBook,
- _SheetNo => $oBook->{SheetCount},
+ Name => $sWsName,
+ Kind => $iKind,
+ _Pos => $iPos,
+ _Book => $oBook,
+ _SheetNo => $oBook->{SheetCount},
+ SheetHidden => $iGr & 0x03
);
}
else {
@@ -1695,10 +1905,11 @@ sub _subBoundSheet {
Spreadsheet::ParseExcel::Worksheet->new(
Name =>
$oBook->{FmtClass}->TextFmt( substr( $sWk, 7 ), '_native_' ),
- Kind => $iKind,
- _Pos => $iPos,
- _Book => $oBook,
- _SheetNo => $oBook->{SheetCount},
+ Kind => $iKind,
+ _Pos => $iPos,
+ _Book => $oBook,
+ _SheetNo => $oBook->{SheetCount},
+ SheetHidden => $iGr & 0x03
);
}
$oBook->{SheetCount}++;
@@ -2412,21 +2623,21 @@ sub _NewCell {
$oCell->{Rich} = \@aRich;
}
- if ( defined $_CellHandler ) {
- if ( defined $_Object ) {
+ if ( defined $oBook->{CellHandler} ) {
+ if ( defined $oBook->{Object} ) {
no strict;
- ref( $_CellHandler ) eq "CODE"
- ? $_CellHandler->(
+ ref( $oBook->{CellHandler} ) eq "CODE"
+ ? $oBook->{CellHandler}->(
$_Object, $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell
)
- : $_CellHandler->callback( $_Object, $oBook, $oBook->{_CurSheet},
+ : $oBook->{CellHandler}->callback( $_Object, $oBook, $oBook->{_CurSheet},
$iR, $iC, $oCell );
}
else {
- $_CellHandler->( $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell );
+ $oBook->{CellHandler}->( $oBook, $oBook->{_CurSheet}, $iR, $iC, $oCell );
}
}
- unless ( $_NotSetCell ) {
+ unless ( $oBook->{NotSetCell} ) {
$oBook->{Worksheet}[ $oBook->{_CurSheet} ]->{Cells}[$iR][$iC] = $oCell;
}
return $oCell;
@@ -2435,12 +2646,19 @@ sub _NewCell {
#------------------------------------------------------------------------------
# ColorIdxToRGB (for Spreadsheet::ParseExcel)
#
-# TODO JMN Make this a Workbook method and re-document.
+# Returns for most recently opened book for compatibility, use
+# Workbook::color_idx_to_rgb instead
#
#------------------------------------------------------------------------------
sub ColorIdxToRGB {
my ( $sPkg, $iIdx ) = @_;
- return ( ( defined $aColor[$iIdx] ) ? $aColor[$iIdx] : $aColor[0] );
+
+
+ unless( defined $currentbook ) {
+ return ( ( defined $aColor[$iIdx] ) ? $aColor[$iIdx] : $aColor[0] );
+ }
+
+ return $currentbook->color_idx_to_rgb( $iIdx );
}
@@ -2544,7 +2762,7 @@ The C<new()> method is used to create a new C<Spreadsheet::ParseExcel> parser ob
my $parser = Spreadsheet::ParseExcel->new();
-It it possible to pass a password to decrypt an encrypted file:
+It is possible to pass a password to decrypt an encrypted file:
$parser = Spreadsheet::ParseExcel->new( Password => 'secret' );
@@ -2952,7 +3170,12 @@ Returns the style of an underlined font where the value has the following meanin
=head2 $font->{Color}
-Returns the color index for the font. The index can be converted to a RGB string using the C<ColorIdxToRGB()> Parser method.
+Returns the color index for the font. The mapping to an RGB color is defined by each workbook.
+
+The index can be converted to a RGB string using the C<$workbook->ColorIdxToRGB()> Parser method.
+
+(Older versions of C<Spreadsheet::ParseExcel> provided the C<ColorIdxToRGB> class method, which is deprecated.)
+
=head2 $font->{Strikeout}
@@ -3300,7 +3523,9 @@ Either the Perl Artistic Licence L<http://dev.perl.org/licenses/artistic.html> o
=head1 AUTHOR
-Current maintainer 0.40+: John McNamara jmcnamara@cpan.org
+Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
+
+Maintainer 0.40-0.59: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
@@ -3311,7 +3536,9 @@ Original author: Kawai Takanori (Hippo2000) kwitknr@cpan.org
=head1 COPYRIGHT
-Copyright (c) 2009-2011 John McNamara
+Copyright (c) 2014 Douglas Wilson
+
+Copyright (c) 2009-2013 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/AuthorK.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/AuthorK.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/AuthorK95.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/AuthorK95.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/FmtTest.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/FmtTest.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Rich.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Rich.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Test1904.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Test1904.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Test1904_95.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Test1904_95.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Test95.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Test95.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Test95J.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Test95J.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Test97.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Test97.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/Test97J.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/Test97J.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Excel/oem.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Excel/oem.xls
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/Ilya.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/Ilya.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/README b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/README
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/chkFmt.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/chkFmt.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/chkInfo.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/chkInfo.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpEx.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpEx.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpExH.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpExH.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpExHJ.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpExHJ.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpExJ.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpExJ.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpExR.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpExR.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpExU.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpExU.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/dmpEx_2xml.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/dmpEx_2xml.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/iftest.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/iftest.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/iftestj.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/iftestj.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/parse.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/parse.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/sample.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/sample.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/sampleOEM.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/sampleOEM.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/sample_j.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/sample_j.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/smpFile.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/smpFile.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/sample/xls2csv.pl b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/sample/xls2csv.pl
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/00_basic.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/00_basic.t
old mode 100644
new mode 100755
@@ -131,6 +131,35 @@ else {
}
}
+eval "require IO::Wrap";
+if ($@) {
+ ok (1, "Skipped - no IO::Wrap") for 1..4;
+ }
+else {
+{
+ open my $fh, '<','t/excel_files/Test95.xls';
+ my $workbook = Spreadsheet::ParseExcel::Workbook->Parse($fh);
+ isnt($workbook, $workbook_1);
+ delete $workbook_1->{File}; # when give a filehandlres this field is not set
+ is_deeply($workbook, $workbook_1);
+ BEGIN { $tests += 2; }
+}
+
+# pass an IO::Wrap object
+{
+ my $data;
+ my $fh;
+ if (open my $real_fh, '<','t/excel_files/Test95.xls') {
+ binmode($real_fh);
+ $fh = IO::Wrap::wraphandle($real_fh);
+ }
+ my $workbook = Spreadsheet::ParseExcel::Workbook->Parse($fh);
+ isnt($workbook, $workbook_1);
+ is_deeply($workbook, $workbook_1);
+ BEGIN { $tests += 2; }
+}
+}
+
sub _save_file {
my ($file, $data) = @_;
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/02_parse-dates.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/02_parse-dates.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/03_regression.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/03_regression.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/04_regression.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/04_regression.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/05_regression.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/05_regression.t
old mode 100644
new mode 100755
@@ -100,7 +100,7 @@ is( $got_2, $expected_1, $caption );
$caption = "Test cell format string";
$cell = $worksheet->get_cell( 2, 1 );
-$expected_1 = '@'; # TODO. Probably should be '' or 'general'.
+$expected_1 = 'General'; # TODO. Probably should be '' or 'general'.
$got_1 = $workbook->{FmtClass}->FmtString( $cell, $workbook );
$caption = " \tCell regression: " . $caption;
@@ -0,0 +1,69 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+BEGIN { delete @ENV{qw( LANG LC_ALL LC_DATE )}; }
+
+use Test::More tests => 83;
+
+use_ok ("Spreadsheet::ParseExcel");
+
+my $file = "t/excel_files/Dates.xls";
+
+my @expect = (# Date Date Date Date Text
+ [ 39668, "8-Aug", 20080808, "2008-08-08", "08/08/2008", "08 Aug 2008" ],
+ [ 39672, "12-Aug", 20080812, "2008-08-12", "08/12/2008", "12 Aug 2008" ],
+ [ 39790, "8-Dec", 20081208, "2008-12-08", "12/08/2008", "08 Dec 2008" ],
+ [ 39673, "13-Aug", 20080813, "2008-08-13", "08/13/2008", "13 Aug 2008" ],
+ );
+
+my $handler_number = 1;
+
+my $cell_cnt;
+my $handler1 = sub {
+ my ($wb, $idx, $row, $col, $cell) = @_;
+ my $R = $row + 1;
+ my $C = $col + 1;
+ return if $R > 4;
+ cmp_ok($handler_number, '==', 1, 'Correct handler');
+ parse_second_workbook() if ++$cell_cnt == 10;
+ my $cell_pos = ("A".."E")[$col].$R;
+ is ($cell->Value, $expect[$row][$C], "Handler 1 value for $cell_pos");
+};
+
+my $parser1;
+ok (
+ $parser1 = Spreadsheet::ParseExcel->new(
+ CellHandler => $handler1,
+ NotSetCell => 1,
+ ),
+ "Create parser 1",
+);
+
+my $handler2 = sub {
+ my ($wb, $idx, $row, $col, $cell) = @_;
+ my $R = $row + 1;
+ my $C = $col + 1;
+ return if $R > 4;
+ cmp_ok($handler_number, '==', 2, 'Correct handler');
+ my $cell_pos = ("A".."E")[$col].$R;
+ is ($cell->Value, $expect[$row][$C], "Handler 2 value for $cell_pos");
+};
+
+my $parser2;
+ok (
+ $parser2 = Spreadsheet::ParseExcel->new(
+ CellHandler => $handler2,
+ NotSetCell => 1,
+ ),
+ "Create parser 2",
+);
+
+$parser1->parse($file);
+
+sub parse_second_workbook {
+ $handler_number = 2;
+ $parser2->parse($file);
+ $handler_number = 1;
+}
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/11_encryption.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/11_encryption.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/20_number_format_default.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/20_number_format_default.t
old mode 100644
new mode 100755
@@ -12,7 +12,7 @@
use strict;
use Spreadsheet::ParseExcel::Utility qw( ExcelFmt LocaltimeExcel );
-use Test::More tests => 142;
+use Test::More tests => 146;
my $is_1904 = 1;
@@ -201,6 +201,14 @@ my @testcases = (
[ 141, 826331.94, '826,331.94 руб.', '#,##0.00\ [$руб.-419]' ],
[ 142, 826331.94, '826,331.94 RUR', '#,##0.00\ [$RUR]' ],
+ # http://rt.cpan.org/Public/Bug/Display.html?id=93142
+ [ 143, 41700.18, 'Sunday, March 02, 2014', 'dddd, mmmm dd, yyyy' ],
+ [ 144, 41700.18, 'Sunday, March 02, 2014', '[$-F800]dddd, mmmm dd, yyyy' ],
+
+ # http://rt.cpan.org/Ticket/Display.html?id=47072
+ [ 145, 39814, '1/1/2009 12:00 AM', 'm/d/yyyy h:mm AM/PM' ],
+ [ 146, '39813.999999994212963', '1/1/2009 12:00 AM', 'm/d/yyyy h:mm AM/PM' ],
+
);
###############################################################################
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/22_number_format_datetime.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/22_number_format_datetime.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/23_number_format_time.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/23_number_format_time.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/24_row_col_sizes.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/24_row_col_sizes.t
old mode 100644
new mode 100755
@@ -0,0 +1,51 @@
+#!/usr/bin/perl -w
+
+###############################################################################
+#
+# A test for Spreadsheet::ParseExcel.
+#
+# Test for get_active_sheet
+#
+
+use strict;
+
+use Test::More tests => 8;
+
+use Spreadsheet::ParseExcel;
+
+##############################################################################
+#
+# Tests.
+#
+
+my $parser = Spreadsheet::ParseExcel->new;
+
+# Workbook saved with sheet2 (index 1) open
+
+my $book = $parser->parse( "t/excel_files/TestActiveSheet.xls" );
+my $active = $book->get_active_sheet;
+is($active, 1);
+
+my $ws = $book->worksheet('Sheet1');
+my $color = $book->color_idx_to_rgb($ws->get_tab_color);
+is($color,'339966');
+
+my $hidden = $ws->is_sheet_hidden;
+is($hidden, 0);
+$hidden = $book->worksheet('Sheet3')->is_sheet_hidden;
+is($hidden, 1);
+
+$hidden = $ws->is_row_hidden(1-1);
+is($hidden,undef);
+$hidden = $ws->is_row_hidden(4-1);
+is($hidden,1);
+
+$hidden = $ws->is_col_hidden(ord( 'A' ) - ord( 'A' ));
+is($hidden,undef);
+$hidden = $ws->is_col_hidden(ord( 'D' ) - ord( 'A' ));
+is($hidden,1);
+
+
+
+
+__END__
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/30_sst_01.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/30_sst_01.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/32_charts.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/32_charts.t
old mode 100644
new mode 100755
@@ -0,0 +1,86 @@
+#!perl -w
+
+use strict;
+use Test::More;
+
+eval "use Spreadsheet::WriteExcel; 1;"
+ or plan( skip_all => "Spreadsheet::ParseExcel::SaveParser requires Spreadsheet::WriteExcel" );
+
+use utf8;
+use Encode qw(encode);
+
+plan(tests => 7);
+
+use_ok ('Spreadsheet::ParseExcel::SaveParser');
+
+use_ok ('Spreadsheet::WriteExcel');
+
+my $xl_base_name = 't/excel_files/46_save_parser.xls';
+
+my $xl_base = Spreadsheet::WriteExcel->new($xl_base_name);
+
+# testing merged cells
+
+# first, we need to generate excel file with merged cells
+my $worksheet = $xl_base->add_worksheet();
+
+my $format = $xl_base->add_format(
+ border => 6,
+ valign => 'vcenter',
+ align => 'center',
+);
+
+$worksheet->merge_range('A1:B2', 'V & H', $format);
+
+$worksheet->merge_range('E5:H8', 'V & H', $format);
+
+$worksheet->fit_to_pages(1, 1);
+
+$xl_base->close;
+
+# parse excel and write modified file
+my $xl_parser = Spreadsheet::ParseExcel::SaveParser->new;
+my $template = $xl_parser->Parse($xl_base_name);
+
+# test writing data to merged cell
+$template->worksheet (0)->AddCell (4, 4, 'V & H mod');
+
+my $workbook;
+{
+ local $^W = 0;
+
+ $workbook = $template->SaveAs ($xl_base_name . '.mod.xls');
+}
+
+$workbook->close;
+
+# parse modified file and check for merged cell
+
+my $template_mod = $xl_parser->Parse ($xl_base_name . '.mod.xls');
+
+my $worksheet_mod = $template_mod->worksheet (0);
+
+my $merged_areas = $worksheet_mod->get_merged_areas;
+
+ok scalar @$merged_areas == 2, 'merged areas count';
+
+my @fit = $worksheet_mod->get_fit_to_pages;
+
+is_deeply (\@fit, [1, 1], 'fix for fit to pages');
+
+#use Data::Dumper;
+#warn Dumper $merged_areas;
+
+# RowHeight
+
+is_deeply $merged_areas->[0], [0, 0, 1, 1];
+
+is_deeply $merged_areas->[1], [4, 4, 7, 7], 'overwritten merged cell position';
+
+ok $worksheet_mod->Cell (4, 4)->value eq 'V & H mod', 'overwritten merged cell value';
+
+unlink $xl_base_name;
+
+unlink $xl_base_name . '.mod.xls';
+
+1;
@@ -0,0 +1,104 @@
+#!/usr/bin/perl -w
+
+###############################################################################
+#
+# A test for Spreadsheet::ParseExcel.
+#
+# Test for get_active_sheet
+#
+
+use strict;
+
+use Test::More tests => 45;
+
+use Spreadsheet::ParseExcel;
+
+##############################################################################
+#
+# Tests.
+#
+
+my $parser = Spreadsheet::ParseExcel->new;
+
+# Workbook saved with sheet2 (index 1) open
+
+my $book = $parser->parse( "t/excel_files/TestActiveSheet.xls" );
+my $active = $book->get_active_sheet;
+is($active, 1, 'Correct sheet');
+
+my $ws = $book->worksheet('Sheet2');
+
+my %expect = (
+ A3 => { },
+ # Each entry adds 6 tests
+ A6 => { desc => q(http://www.example.com),
+ link => q(http://www.example.com/),
+ },
+ B6 => { desc => q(http://www.example.com#foo),
+ link => q(http://www.example.com/#foo),
+ },
+ C6 => { desc => q(file:///c:\\nodir\\nofile.txt),
+ link => q(file:///c:\\nodir\\nofile.txt),
+ },
+ D6 => { desc => q(\\\\server\\quirks\\sometest.bat),
+ link => q(file:///\\\\server\\quirks\\sometest.bat),
+ },
+ E6 => { desc => q(TestActiveSheet.xls),
+ rel => 1,
+ link => q(TestActiveSheet.xls),
+ },
+ F6 => { desc => q(Sheet2!A7),
+ link => q(#Sheet2%21A7),
+ },
+ A7 => { desc => q(www.example.com),
+ link => q(http://www.example.com/),
+ },
+ B7 => { desc => q(www.example.com#foo),
+ link => q(http://www.example.com/#foo),
+ },
+ C7 => { desc => q(c:\\nodir\\nofile.txt),
+ link => q(file:///c:\\nodir\\nofile.txt),
+ },
+ D7 => { desc => q(SMB Link Sometest.bat),
+ link => q(file:///\\\\server\\quirks\\sometest.bat),
+ },
+ E7 => { desc => q(Rel: TestActiveSheet.xls),
+ rel => 1,
+ link => q(TestActiveSheet.xls),
+ },
+ F7 => { desc => q(mailto:fred@example.net),
+ link => q(mailto:fred@example.net),
+ },
+ A9 => { desc => q(file:///..\\..\\zipple.dat),
+ link => q(../../zipple.dat),
+ },
+ A10 => { desc => q(ftp://user:pass@example.net/pub/manuals/Excel.doc),
+ link => q(ftp://user:pass@example.net/pub/manuals/Excel.doc),
+ },
+ );
+
+foreach my $t (sort keys %expect) {
+ my $link = $expect{$t}{link};
+ my $desc = $expect{$t}{desc};
+ my $rel = $expect{$t}{rel};
+ if( $rel ) {
+ $link = "file:///t/excel_files/$link";
+ }
+
+ $t =~ m/^(.)(\d+)$/ or die;
+ my $cell = $ws->get_cell( $2-1, (ord($1)-ord('A')) );
+ ok( defined $cell, "Cell $t defined" );
+ next unless defined $cell;
+
+ my $hl = $cell->get_hyperlink;
+ if( !defined $link ) {
+ is( $hl, undef, "Cell $t should have no link" );
+ next;
+ }
+ ok( defined $hl->[0] && $hl->[0] eq $desc, "Cell $t description match" );
+ ok( defined $hl->[1] && $hl->[1] eq $link, "Cell $t link match" );
+}
+
+
+
+__END__
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/90_pod.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/90_pod.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/91_minimumversion.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/91_minimumversion.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/92_meta.t b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/92_meta.t
old mode 100644
new mode 100755
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/Dates.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/Dates.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/Test2000J.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/Test2000J.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/Test95.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/Test95.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/Test95J.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/Test95J.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/Test97J.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/Test97J.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/TestActiveSheet.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/TestActiveSheet.xls
new file mode 100755
index 00000000..96ef4ba3
Binary files /dev/null and b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/TestActiveSheet.xls differ
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/TestEncoding.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/TestEncoding.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/pers-encrypted-RC4-pass-11.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/pers-encrypted-RC4-pass-11.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/pers-encrypted-def-pass-QwErTyUiOp.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/pers-encrypted-def-pass-QwErTyUiOp.xls
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JMCNAMARA/Spreadsheet-ParseExcel-0.59/Spreadsheet-ParseExcel-0.59/t/excel_files/pers-protected.xls b/var/tmp/source/DOUGW/Spreadsheet-ParseExcel-0.65/Spreadsheet-ParseExcel-0.65/t/excel_files/pers-protected.xls
old mode 100755
new mode 100644