From 90ca90b8e8f2dafc2befb8c5ddba1eea8e4eebf3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 16 Sep 2013 23:35:00 -0400 Subject: fix row and column range for empty sheets (fixes #8) --- t/bug-8.t | 19 +++++++++++++++++++ t/data/bug-8.xlsx | Bin 0 -> 8639 bytes 2 files changed, 19 insertions(+) create mode 100644 t/bug-8.t create mode 100644 t/data/bug-8.xlsx (limited to 't') diff --git a/t/bug-8.t b/t/bug-8.t new file mode 100644 index 0000000..45dad0d --- /dev/null +++ b/t/bug-8.t @@ -0,0 +1,19 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; + +use Spreadsheet::ParseXLSX; + +my $wb = Spreadsheet::ParseXLSX->new->parse('t/data/bug-7.xlsx'); +is($wb->worksheet_count, 3); + +my $ws = $wb->worksheet(2); +my ($rmin, $rmax) = $ws->row_range; +my ($cmin, $cmax) = $ws->col_range; +is($rmin, 0); +is($rmax, -1); +is($cmin, 0); +is($cmax, -1); + +done_testing; diff --git a/t/data/bug-8.xlsx b/t/data/bug-8.xlsx new file mode 100644 index 0000000..c516813 Binary files /dev/null and b/t/data/bug-8.xlsx differ -- cgit v1.2.3-54-g00ecf