--- loncom/interface/statistics/lonstudentassessment.pm 2004/01/27 19:50:03 1.82 +++ loncom/interface/statistics/lonstudentassessment.pm 2004/02/06 19:29:00 1.83 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.82 2004/01/27 19:50:03 matthew Exp $ +# $Id: lonstudentassessment.pm,v 1.83 2004/02/06 19:29:00 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1035,11 +1035,16 @@ END $seq->{'Excel:endcell'} = $seq->{'Excel:startcell'}; $seq->{'Excel:endcol'} = $seq->{'Excel:startcol'}; } else { - &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell - ($rows_output,$cols_output-1); + $seq->{'Excel:endcell'} = + &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell + ($rows_output,$cols_output-1); $seq->{'Excel:endcol'} = $cols_output-1; } # Create the formula for summing up this sequence + if (! exists($seq->{'Excel:endcell'}) || + ! defined($seq->{'Excel:endcell'})) { + $seq->{'Excel:endcell'} = $seq->{'Excel:startcell'}; + } $seq->{'Excel:sum'}= $excel_sheet->store_formula ('=SUM('.$seq->{'Excel:startcell'}. ':'.$seq->{'Excel:endcell'}.')');