LP#1351355: Switch to XLSX format for Excel report output
authorMike Rylander <mrylander@gmail.com>
Fri, 1 Aug 2014 15:26:38 +0000 (11:26 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 7 Aug 2014 21:29:03 +0000 (17:29 -0400)
We've always used Spreadsheet::WriteExcel::Big to generate Excel output
from reports. That module has a limitation of 64k rows, imposed by the
binary Excel format. Recently, the Excel::Writer::XLSX module has become
feature-complete enough that we can use that instead, and the XML format
files that it writes are now supported by the majority of installed
versions of Excel (and OpenOffice) -- the format arrived with Excel 2007,
released in 2006 (8 years ago). So, let's switch to that!

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/extras/install/Makefile.debian-squeeze
Open-ILS/src/extras/install/Makefile.debian-wheezy
Open-ILS/src/extras/install/Makefile.fedora
Open-ILS/src/extras/install/Makefile.ubuntu-precise
Open-ILS/src/extras/install/Makefile.ubuntu-trusty
Open-ILS/src/reporter/clark-kent.pl
Open-ILS/src/support-scripts/settings-tester.pl

index a61cc37..2d6bdfa 100644 (file)
@@ -42,7 +42,6 @@ export DEBS = \
        libnspr4-dev\
        libole-storage-lite-perl\
        libparent-perl\
-       libspreadsheet-writeexcel-perl\
        libssh2-1-dev\
        libtest-warn-perl\
        libtest-output-perl\
@@ -67,6 +66,7 @@ export DEB_APACHE_DISMODS = \
     deflate
 
 export CPAN_MODULES = \
+       Excel::Writer::XLSX \
        Business::OnlinePayment::PayPal \
        Library::CallNumber::LC \
        Net::Z3950::Simple2ZOOM \
index fce9205..a73be1e 100644 (file)
@@ -43,7 +43,6 @@ export DEBS = \
        libpq-dev\
        librose-uri-perl\
        librpc-xml-perl\
-       libspreadsheet-writeexcel-perl\
        libsru-perl\
        libssh2-1-dev\
        libtest-warn-perl\
@@ -70,6 +69,7 @@ export DEB_APACHE_DISMODS = \
     deflate
 
 export CPAN_MODULES = \
+       Excel::Writer::XLSX \
        Business::OnlinePayment::PayPal \
        Template::Plugin::POSIX \
        Safe
index 3a97af4..b178c3b 100644 (file)
@@ -47,7 +47,6 @@ FEDORA_RPMS = \
        perl-OLE-Storage_Lite \
        perl-RPC-XML \
        perl-SOAP-Lite \
-       perl-Spreadsheet-WriteExcel \
        perl-Test-Warn \
        perl-Test-Output \
        perl-Text-Aspell \
@@ -62,6 +61,7 @@ FEDORA_RPMS = \
        yaz
 
 export CPAN_MODULES = \
+       Excel::Writer::XLSX \
        Business::ISSN \
        Net::Z3950::ZOOM \
        Net::Z3950::Simple2ZOOM \
index f7c9f82..20c00ff 100644 (file)
@@ -46,7 +46,6 @@ export DEBS = \
        libpq5\
        libpq-dev\
        librpc-xml-perl\
-       libspreadsheet-writeexcel-perl\
        libsru-perl\
        libssh2-1-dev\
        libtext-aspell-perl\
@@ -72,6 +71,7 @@ export DEB_APACHE_DISMODS = \
     deflate
 
 export CPAN_MODULES = \
+       Excel::Writer::XLSX \
        Business::CreditCard::Object \
        Business::OnlinePayment::PayPal \
        Template::Plugin::POSIX \
index 5e6e307..1b5e0db 100644 (file)
@@ -47,7 +47,6 @@ export DEBS = \
        libpq-dev\
        librose-uri-perl\
        librpc-xml-perl\
-       libspreadsheet-writeexcel-perl\
        libsru-perl\
        libssh2-1-dev\
        libtemplate-plugin-posix-perl\
@@ -78,6 +77,7 @@ export DEB_APACHE_DISCONF = \
     serve-cgi-bin
 
 export CPAN_MODULES = \
+       Excel::Writer::XLSX \
        Business::CreditCard::Object \
        Business::OnlinePayment::PayPal \
        Safe
index 29b067d..9030825 100755 (executable)
@@ -10,7 +10,7 @@ use DateTime;
 use DateTime::Format::ISO8601;
 use Data::Dumper;
 use Text::CSV_XS;
-use Spreadsheet::WriteExcel::Big;
+use Excel::Writer::XLSX;
 use OpenSRF::EX qw/:try/;
 use OpenSRF::Utils qw/:daemon/;
 use OpenSRF::Utils::JSON;
@@ -251,7 +251,7 @@ for my $r ( @reports ) {
                }
 
                if ( $r->{excel_format} ) {
-                       build_excel("$output_dir/report-data.xls", $r);
+                       build_excel("$output_dir/report-data.xlsx", $r);
                }
 
                build_html("$output_dir/report-data.html", $r);
@@ -417,7 +417,7 @@ sub build_csv {
 sub build_excel {
        my $file = shift;
        my $r = shift;
-       my $xls = Spreadsheet::WriteExcel::Big->new($file);
+       my $xls = Excel::Writer::XLSX->new($file);
 
        my $sheetname = substr($r->{report}->{name},0,30);
        $sheetname =~ s/\W/_/gos;
@@ -466,7 +466,7 @@ sub build_html {
        push @links, "<a href='report-data.html.raw.html'>Tabular Output</a>" if ($r->{html_format});
 
        # add a link to the CSV output
-       push @links, "<a href='report-data.xls'>Excel Output</a>" if ($r->{excel_format});
+       push @links, "<a href='report-data.xlsx'>Excel Output</a>" if ($r->{excel_format});
 
        # add a link to the CSV output
        push @links, "<a href='report-data.csv'>CSV Output</a>" if ($r->{csv_format});
index 8f21b14..030ef05 100755 (executable)
@@ -457,7 +457,7 @@ Log::Log4perl
 Email::Send
 Text::CSV
 Text::CSV_XS
-Spreadsheet::WriteExcel::Big
+Excel::Writer::XLSX
 Tie::IxHash
 Parse::RecDescent
 SRU