From e19d29a330c2231dd3d10ab3652f55bef4a0aaea Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 1 Aug 2014 11:26:38 -0400 Subject: [PATCH] LP#1351355: Switch to XLSX format for Excel report output 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 Signed-off-by: Ben Shum --- Open-ILS/src/extras/install/Makefile.debian-squeeze | 2 +- Open-ILS/src/extras/install/Makefile.debian-wheezy | 2 +- Open-ILS/src/extras/install/Makefile.fedora | 2 +- Open-ILS/src/extras/install/Makefile.ubuntu-precise | 2 +- Open-ILS/src/extras/install/Makefile.ubuntu-trusty | 2 +- Open-ILS/src/reporter/clark-kent.pl | 8 ++++---- Open-ILS/src/support-scripts/settings-tester.pl | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/extras/install/Makefile.debian-squeeze b/Open-ILS/src/extras/install/Makefile.debian-squeeze index a61cc37138..2d6bdfa0a5 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-squeeze +++ b/Open-ILS/src/extras/install/Makefile.debian-squeeze @@ -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 \ diff --git a/Open-ILS/src/extras/install/Makefile.debian-wheezy b/Open-ILS/src/extras/install/Makefile.debian-wheezy index fce9205940..a73be1e4d9 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-wheezy +++ b/Open-ILS/src/extras/install/Makefile.debian-wheezy @@ -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 diff --git a/Open-ILS/src/extras/install/Makefile.fedora b/Open-ILS/src/extras/install/Makefile.fedora index 3a97af4a2f..b178c3b13a 100644 --- a/Open-ILS/src/extras/install/Makefile.fedora +++ b/Open-ILS/src/extras/install/Makefile.fedora @@ -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 \ diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-precise b/Open-ILS/src/extras/install/Makefile.ubuntu-precise index f7c9f8203d..20c00ff7de 100644 --- a/Open-ILS/src/extras/install/Makefile.ubuntu-precise +++ b/Open-ILS/src/extras/install/Makefile.ubuntu-precise @@ -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 \ diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty index 5e6e307463..1b5e0db244 100644 --- a/Open-ILS/src/extras/install/Makefile.ubuntu-trusty +++ b/Open-ILS/src/extras/install/Makefile.ubuntu-trusty @@ -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 diff --git a/Open-ILS/src/reporter/clark-kent.pl b/Open-ILS/src/reporter/clark-kent.pl index 29b067dad4..9030825988 100755 --- a/Open-ILS/src/reporter/clark-kent.pl +++ b/Open-ILS/src/reporter/clark-kent.pl @@ -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, "Tabular Output" if ($r->{html_format}); # add a link to the CSV output - push @links, "Excel Output" if ($r->{excel_format}); + push @links, "Excel Output" if ($r->{excel_format}); # add a link to the CSV output push @links, "CSV Output" if ($r->{csv_format}); diff --git a/Open-ILS/src/support-scripts/settings-tester.pl b/Open-ILS/src/support-scripts/settings-tester.pl index 8f21b14c20..030ef05cdb 100755 --- a/Open-ILS/src/support-scripts/settings-tester.pl +++ b/Open-ILS/src/support-scripts/settings-tester.pl @@ -457,7 +457,7 @@ Log::Log4perl Email::Send Text::CSV Text::CSV_XS -Spreadsheet::WriteExcel::Big +Excel::Writer::XLSX Tie::IxHash Parse::RecDescent SRU -- 2.43.2