version 1.82, 2004/01/27 19:50:03
|
version 1.84, 2004/02/10 16:47:25
|
Line 1016 END
|
Line 1016 END
|
# Put the names of the problems and parts into the sheet |
# Put the names of the problems and parts into the sheet |
my $count = 0; |
my $count = 0; |
foreach my $res (@{$seq->{'contents'}}) { |
foreach my $res (@{$seq->{'contents'}}) { |
next if ($res->{'type'} ne 'assessment'); |
if ($res->{'type'} ne 'assessment' || |
|
! exists($res->{'parts'}) || |
|
ref($res->{'parts'}) ne 'ARRAY' || |
|
scalar(@{$res->{'parts'}}) < 1) { |
|
next; |
|
} |
if (scalar(@{$res->{'parts'}}) > 1) { |
if (scalar(@{$res->{'parts'}}) > 1) { |
foreach my $part (@{$res->{'parts'}}) { |
foreach my $part (@{$res->{'parts'}}) { |
$excel_sheet->write($rows_output, |
$excel_sheet->write($rows_output, |
Line 1035 END
|
Line 1040 END
|
$seq->{'Excel:endcell'} = $seq->{'Excel:startcell'}; |
$seq->{'Excel:endcell'} = $seq->{'Excel:startcell'}; |
$seq->{'Excel:endcol'} = $seq->{'Excel:startcol'}; |
$seq->{'Excel:endcol'} = $seq->{'Excel:startcol'}; |
} else { |
} else { |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
$seq->{'Excel:endcell'} = |
($rows_output,$cols_output-1); |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
|
($rows_output,$cols_output-1); |
$seq->{'Excel:endcol'} = $cols_output-1; |
$seq->{'Excel:endcol'} = $cols_output-1; |
} |
} |
# Create the formula for summing up this sequence |
# 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 |
$seq->{'Excel:sum'}= $excel_sheet->store_formula |
('=SUM('.$seq->{'Excel:startcell'}. |
('=SUM('.$seq->{'Excel:startcell'}. |
':'.$seq->{'Excel:endcell'}.')'); |
':'.$seq->{'Excel:endcell'}.')'); |