This very trivial patch to clark-kent.pl fixes an zero-indexing vs. one-indexing error when substringing the name of a report to generate the name of an Excel worksheet when producing the Excel version of a report. It's simple enough that I don't think it requires a DCO.

While checking the documentation of Spreadsheet::WriteExcel::Big to make sure the 32 character limit on the worksheet name wasn't just arbitrary, I found out that direct use of Spreadsheet::WriteExcel::Big is now deprecated. I'll send another patch to the list when I get around to fixing that.

Brandon

======================================
Brandon W. Uhlman, Systems Consultant
Public Library Services Branch
British Columbia Ministry of Education
Vancouver, BC (and Lillooet, BC)

Phone: (604) 660-2972 or (250) 256-0344
E-mail: [EMAIL PROTECTED]
        [EMAIL PROTECTED]

Index: Open-ILS/src/reporter/clark-kent.pl
===================================================================
--- Open-ILS/src/reporter/clark-kent.pl (revision 11421)
+++ Open-ILS/src/reporter/clark-kent.pl (working copy)
@@ -372,7 +372,7 @@
        my $r = shift;
        my $xls = Spreadsheet::WriteExcel::Big->new($file);
 
-       my $sheetname = substr($r->{report}->{name},1,31);
+       my $sheetname = substr($r->{report}->{name},0,30);
        $sheetname =~ s/\W/_/gos;
        
        my $sheet = $xls->add_worksheet($sheetname);

Reply via email to