--- loncom/interface/spreadsheet/Spreadsheet.pm 2004/01/14 16:47:39 1.33 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2004/01/15 21:20:07 1.34 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.33 2004/01/14 16:47:39 matthew Exp $ +# $Id: Spreadsheet.pm,v 1.34 2004/01/15 21:20:07 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1557,7 +1557,7 @@ sub outsheet_xml { ## But not on this day my $Str = ''."\n"; while (my ($cell,$formula) = each(%{$self->{'formulas'}})) { - if ($cell =~ /^template_(\d+)/) { + if ($cell =~ /^template_(\w+)/) { my $col = $1; $Str .= ''."\n"; } else { @@ -1570,7 +1570,7 @@ sub outsheet_xml { } } $Str.=""; -# $r->print("
\n\n\n".$Str."\n\n\n
"); + $r->print("
\n\n\n".$Str."\n\n\n
"); return $Str; } @@ -1597,8 +1597,7 @@ sub parse_sheet { $formulas{$cell} = $formula; $sources{$cell} = $source if (defined($source)); $parser->get_text('/field'); - } - if ($token->[1] eq 'template') { + } elsif ($token->[1] eq 'template') { $formulas{'template_'.$token->[2]->{'col'}}= $parser->get_text('/template'); }