[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet Spreadsheet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 21 Apr 2005 17:29:16 -0000


albertel		Thu Apr 21 13:29:16 2005 EDT

  Modified files:              
    /loncom/interface/spreadsheet	Spreadsheet.pm 
  Log:
  - don't put empty cells in the spreadsheet
  
  
Index: loncom/interface/spreadsheet/Spreadsheet.pm
diff -u loncom/interface/spreadsheet/Spreadsheet.pm:1.41 loncom/interface/spreadsheet/Spreadsheet.pm:1.42
--- loncom/interface/spreadsheet/Spreadsheet.pm:1.41	Thu Apr  7 02:56:23 2005
+++ loncom/interface/spreadsheet/Spreadsheet.pm	Thu Apr 21 13:29:16 2005
@@ -1,5 +1,5 @@
 #
-# $Id: Spreadsheet.pm,v 1.41 2005/04/07 06:56:23 albertel Exp $
+# $Id: Spreadsheet.pm,v 1.42 2005/04/21 17:29:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -937,7 +937,8 @@
             $t{$cell}=~s/(^|[^\"\'])([A-Za-z]\d+)/$1\$sheet_values\{\'$2\'\}/g;
             $t{$cell}=~s/(^|[^\"\'])\[([^\]]+)\]/$1.$self->expandnamed($2)/ge;
         } elsif  ( $col  =~ /^[A-Z]$/  ) {
-            if ($formula !~ /^\!/ && exists($self->{'constants'}->{$cell})) {
+            if ($formula !~ /^\!/ && exists($self->{'constants'}->{$cell})
+		&& $self->{'constants'}->{$cell} ne '') {
                 my $data = $self->{'constants'}->{$cell};
                 $t{$cell} = $data;
             }