Spreadsheet::Engine::Functions - Spreadsheet functions (SUM, MAX, etc)
my $ok = calculate_function($fname, \@operand, \$errortext, \%typelookup, \%sheetdata);
This provides all the spreadsheet functions (SUM, MAX, IRR, ISNULL, etc).
Spreadsheet::Engine->register(SUM => 'Spreadsheet::Engine::Function::SUM');
If you wish to make a new function available you should register it here. A series of base classes are provided that do all the argument checking etc., allowing you to concentrate on the calculations. Have a look at how the existing functions are implemented for details (it should hopefully be mostly self-explanatory!)
information on how many arguments should be passed:
$colnum = field_to_colnum(\@sheetdata, $col1num, $ncols, $row1num, $fieldname, $fieldtype)
If fieldname is a number, uses it, otherwise looks up string in cells in row to find field number
If not found, returns 0.
This is a Modified Version of SocialCalc::Functions from SocialCalc 1.1.0
Portions (c) Copyright 2005, 2006, 2007 Software Garden, Inc. All Rights Reserved.
Portions (c) Copyright 2007 Socialtext, Inc. All Rights Reserved.
Portions (c) Copyright 2007, 2008 Tony Bowden
The contents of this file are subject to the Artistic License 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.perlfoundation.org/artistic_license_2_0
To install Spreadsheet::Engine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Spreadsheet::Engine
CPAN shell
perl -MCPAN -e shell install Spreadsheet::Engine
For more information on module installation, please visit the detailed CPAN module installation guide.