[Bio] / FigKernelPackages / raelib.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/raelib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36, Wed Jun 14 01:14:19 2006 UTC revision 1.37, Mon Jun 19 04:05:21 2006 UTC
# Line 854  Line 854 
854    
855  This is experimental as of May, 2006.  This is experimental as of May, 2006.
856    
857    +++++ PLEASE NOTE WELL ++++
858    +
859    + Make the HTML table before you use this method.If you use the tab2excel feature you are fine,
860    + but if you use the methods separately you MUST make the HTML table first, becuase this will screw with your code :)
861    +
862    ++++++++++++++++++++++++++++
863    
864    
865    
866  There are a couple of perl modules that allow you to write to excel files, and so I am trying out the idea of taking our standard $tab table respresentation that is used in HTML.pm and making an excel file that people could download. It seems like that would be a great tool for them to have.  There are a couple of perl modules that allow you to write to excel files, and so I am trying out the idea of taking our standard $tab table respresentation that is used in HTML.pm and making an excel file that people could download. It seems like that would be a great tool for them to have.
867    
868  At the moment the excel modules are in my shared space on the CI machines, and so won't work in every seed installation. Therefore the $self->{'useexcel'} boolean is set at compile time if we successfully load the module.  At the moment the excel modules are in my shared space on the CI machines, and so won't work in every seed installation. Therefore the $self->{'useexcel'} boolean is set at compile time if we successfully load the module.
# Line 916  Line 925 
925    
926      $filename =~ s/^.*\///; # remove any path information. We are going to only write to FIG_Config::temp      $filename =~ s/^.*\///; # remove any path information. We are going to only write to FIG_Config::temp
927      unless ($filename =~ /\.xls$/) {$filename .=".xls"}      unless ($filename =~ /\.xls$/) {$filename .=".xls"}
928    
929        # do we already have this file -- if so, just return that info
930        return  1 if ($self->{'excel_short_filename'} eq $filename); # don't do anything, just return the fact that we have the book made!
931    
932    
933      $self->{'excel_short_filename'}=$filename;      $self->{'excel_short_filename'}=$filename;
934      $self->{'excel_filename'}=$FIG_Config::temp."/$filename";      $self->{'excel_filename'}=$FIG_Config::temp."/$filename";
935    
936    
937      # Each excel file consists of the file, and then of worksheets from within the file. These are the tabs at the bottom of the screen      # Each excel file consists of the file, and then of worksheets from within the file. These are the tabs at the bottom of the screen
938      # that can be added with "Insert->new worksheet" from the menus.      # that can be added with "Insert->new worksheet" from the menus.
939      # Create a new workbook called simple.xls and add a worksheet      # Create a new workbook called simple.xls and add a worksheet
# Line 948  Line 963 
963          return;          return;
964      }      }
965    
966        if (length($title) > 31) {$title=substr($title, 0, 31)}
967      my $worksheet = $self->{'excel_workbook'}->add_worksheet($title);      my $worksheet = $self->{'excel_workbook'}->add_worksheet($title);
968      # The general syntax for output to an excel file is write($row, $column, $value, $format). Note that row and      # The general syntax for output to an excel file is write($row, $column, $value, $format). Note that row and
969      # column are zero indexed      # column are zero indexed

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3