r45483 - in /branches/upstream/libspreadsheet-xlsx-perl/current: Changes META.yml lib/Spreadsheet/XLSX.pm lib/Spreadsheet/XLSX/Fmt2007.pm lib/Spreadsheet/XLSX/Utility2007.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Oct 8 14:22:26 UTC 2009


Author: jawnsy-guest
Date: Thu Oct  8 14:22:20 2009
New Revision: 45483

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45483
Log:
[svn-upgrade] Integrating new upstream version, libspreadsheet-xlsx-perl (0.12)

Modified:
    branches/upstream/libspreadsheet-xlsx-perl/current/Changes
    branches/upstream/libspreadsheet-xlsx-perl/current/META.yml
    branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX.pm
    branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Fmt2007.pm
    branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Utility2007.pm

Modified: branches/upstream/libspreadsheet-xlsx-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-xlsx-perl/current/Changes?rev=45483&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-xlsx-perl/current/Changes (original)
+++ branches/upstream/libspreadsheet-xlsx-perl/current/Changes Thu Oct  8 14:22:20 2009
@@ -1,4 +1,12 @@
 Revision history for Perl extension Spreadsheet::XLSX.
+
+0.12  Tue Oct  6 10:04:37 MSD 2009
+
+	- sheets are now detected by relations (xl/_rels/workbook.xml.rels), not numbers (RT #50236, thanks Pat Mariani)
+
+0.11  Mon Oct  5 19:03:46 MSD 2009
+
+	- sheets numbering fixed (RT #50211, thanks endacoe)
 
 0.1   Wed Mar 25 18:19:46 MSK 2009
 

Modified: branches/upstream/libspreadsheet-xlsx-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-xlsx-perl/current/META.yml?rev=45483&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-xlsx-perl/current/META.yml (original)
+++ branches/upstream/libspreadsheet-xlsx-perl/current/META.yml Thu Oct  8 14:22:20 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Spreadsheet-XLSX
-version:             0.1
+version:             0.12
 abstract:            Perl extension for reading MS Excel 2007 files;
 license:             ~
 author:              

Modified: branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX.pm?rev=45483&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX.pm (original)
+++ branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX.pm Thu Oct  8 14:22:20 2009
@@ -6,7 +6,7 @@
 
 our @ISA = qw();
 
-our $VERSION = '0.1';
+our $VERSION = '0.12';
 
 use Archive::Zip;
 use Spreadsheet::XLSX::Fmt2007;
@@ -71,7 +71,18 @@
 
         }
 
-		
+	my $member_rels = $self -> {zip} -> memberNamed ('xl/_rels/workbook.xml.rels') or die ("xl/_rels/workbook.xml.rels not found in this zip\n");
+	
+	my %rels = ();
+
+	foreach ($member_rels -> contents =~ /\<Relationship (.*?)\/?\>/g) {
+	
+		/^Id="(.*?)".*?Target="(.*?)"/ or next;
+		
+		$rels {$1} = $2;
+	
+	}
+
 	my $member_workbook = $self -> {zip} -> memberNamed ('xl/workbook.xml') or die ("xl/workbook.xml not found in this zip\n");
 	my $oBook = Spreadsheet::ParseExcel::Workbook->new;
 	$oBook->{SheetCount} = 0;
@@ -107,8 +118,10 @@
 				$sheet -> {Name} = $v;
 				$sheet -> {Name} = $converter -> convert ($sheet -> {Name}) if $converter;
 			}
-			elsif ($k eq 'r:id') {
-				($sheet -> {Id}) = $v =~ m{rId(\d+)};
+			elsif ($k eq 'r:id')	{
+			
+				$sheet -> {path} = $rels {$v};
+				
 			};
 					
 		}
@@ -122,10 +135,8 @@
 	$self -> {Worksheet} = \@Worksheet;
 	
 	foreach my $sheet (@Worksheet) {
-	
-		my $member_name  = "xl/worksheets/sheet$sheet->{Id}.xml";
-	
-		my $member_sheet = $self -> {zip} -> memberNamed ($member_name) or next;
+		
+		my $member_sheet = $self -> {zip} -> memberNamed ("xl/$sheet->{path}") or next;
 	
 		my ($row, $col);
 		
@@ -315,6 +326,8 @@
 	Rob Polocz
 	Gregor Herrmann
 	H.Merijn Brand
+	endacoe
+	Pat Mariani
 	
 =head1 ACKNOWLEDGEMENTS	
 

Modified: branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Fmt2007.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Fmt2007.pm?rev=45483&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Fmt2007.pm (original)
+++ branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Fmt2007.pm Thu Oct  8 14:22:20 2009
@@ -8,7 +8,7 @@
 use warnings;
 
 use Spreadsheet::XLSX::Utility2007 qw(ExcelFmt);
-our $VERSION = '0.1'; # 
+our $VERSION = '0.12'; # 
 
 my %hFmtDefault = (
     0x00 => '@',

Modified: branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Utility2007.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Utility2007.pm?rev=45483&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Utility2007.pm (original)
+++ branches/upstream/libspreadsheet-xlsx-perl/current/lib/Spreadsheet/XLSX/Utility2007.pm Thu Oct  8 14:22:20 2009
@@ -13,7 +13,7 @@
 use vars qw(@ISA @EXPORT_OK);
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(ExcelFmt LocaltimeExcel ExcelLocaltime col2int int2col sheetRef xls2csv);
-our $VERSION = '0.1';
+our $VERSION = '0.12';
 
 my $sNUMEXP = '(^[+-]?\d+(\.\d+)?$)|(^[+-]?\d+\.?(\d*)[eE][+-](\d+))$';
 




More information about the Pkg-perl-cvs-commits mailing list