Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/FormulaParsing/Excel/Functions/BuiltInFunctions.cs

Last change on this file was 12074, checked in by sraggl, 10 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 8.6 KB
Line 
1/* Copyright (C) 2011  Jan Källman
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
11 * See the GNU Lesser General Public License for more details.
12 *
13 * The GNU Lesser General Public License can be viewed at http://www.opensource.org/licenses/lgpl-license.php
14 * If you unfamiliar with this license or have questions about it, here is an http://www.gnu.org/licenses/gpl-faq.html
15 *
16 * All code and executables are provided "as is" with no warranty either express or implied.
17 * The author accepts no liability for any damage or loss of business that this product may cause.
18 *
19 * Code change notes:
20 *
21 * Author             Change            Date
22 *******************************************************************************
23 * Mats Alm                       Added                   2013-12-03
24 *******************************************************************************/
25using System;
26using System.Collections.Generic;
27using System.Linq;
28using System.Text;
29using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
30using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
31using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
32using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
33using OfficeOpenXml.FormulaParsing.Excel.Functions.Numeric;
34using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
35using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
36
37namespace OfficeOpenXml.FormulaParsing.Excel.Functions
38{
39    public class BuiltInFunctions : FunctionsModule
40    {
41        public BuiltInFunctions()
42        {
43            // Text
44            Functions["len"] = new Len();
45            Functions["lower"] = new Lower();
46            Functions["upper"] = new Upper();
47            Functions["left"] = new Left();
48            Functions["right"] = new Right();
49            Functions["mid"] = new Mid();
50            Functions["replace"] = new Replace();
51            Functions["rept"] = new Rept();
52            Functions["substitute"] = new Substitute();
53            Functions["concatenate"] = new Concatenate();
54            Functions["char"] = new CharFunction();
55            Functions["exact"] = new Exact();
56            Functions["find"] = new Find();
57            Functions["fixed"] = new Fixed();
58            Functions["proper"] = new Proper();
59            Functions["text"] = new Text.Text();
60            Functions["t"] = new T();
61            Functions["hyperlink"] = new Hyperlink();
62            // Numbers
63            Functions["int"] = new CInt();
64            // Math
65            Functions["abs"] = new Abs();
66            Functions["asin"] = new Asin();
67            Functions["asinh"] = new Asinh();
68            Functions["cos"] = new Cos();
69            Functions["cosh"] = new Cosh();
70            Functions["power"] = new Power();
71            Functions["sign"] = new Sign();
72            Functions["sqrt"] = new Sqrt();
73            Functions["sqrtpi"] = new SqrtPi();
74            Functions["pi"] = new Pi();
75            Functions["product"] = new Product();
76            Functions["ceiling"] = new Ceiling();
77            Functions["count"] = new Count();
78            Functions["counta"] = new CountA();
79            Functions["countblank"] = new CountBlank();
80            Functions["countif"] = new CountIf();
81            Functions["countifs"] = new CountIfs();
82            Functions["fact"] = new Fact();
83            Functions["floor"] = new Floor();
84            Functions["sin"] = new Sin();
85            Functions["sinh"] = new Sinh();
86            Functions["sum"] = new Sum();
87            Functions["sumif"] = new SumIf();
88            Functions["sumifs"] = new SumIfs();
89            Functions["sumproduct"] = new SumProduct();
90            Functions["sumsq"] = new Sumsq();
91            Functions["stdev"] = new Stdev();
92            Functions["stdevp"] = new StdevP();
93            Functions["stdev.s"] = new Stdev();
94            Functions["stdev.p"] = new StdevP();
95            Functions["subtotal"] = new Subtotal();
96            Functions["exp"] = new Exp();
97            Functions["log"] = new Log();
98            Functions["log10"] = new Log10();
99            Functions["ln"] = new Ln();
100            Functions["max"] = new Max();
101            Functions["maxa"] = new Maxa();
102            Functions["median"] = new Median();
103            Functions["min"] = new Min();
104            Functions["mina"] = new Mina();
105            Functions["mod"] = new Mod();
106            Functions["average"] = new Average();
107            Functions["averagea"] = new AverageA();
108            Functions["averageif"] = new AverageIf();
109            Functions["averageifs"] = new AverageIfs();
110            Functions["round"] = new Round();
111            Functions["rounddown"] = new Rounddown();
112            Functions["roundup"] = new Roundup();
113            Functions["rand"] = new Rand();
114            Functions["randbetween"] = new RandBetween();
115            Functions["quotient"] = new Quotient();
116            Functions["trunc"] = new Trunc();
117            Functions["tan"] = new Tan();
118            Functions["tanh"] = new Tanh();
119            Functions["atan"] = new Atan();
120            Functions["atan2"] = new Atan2();
121            Functions["atanh"] = new Atanh();
122            Functions["acos"] = new Acos();
123            Functions["acosh"] = new Acosh();
124            Functions["var"] = new Var();
125            Functions["varp"] = new VarP();
126            Functions["large"] = new Large();
127            Functions["small"] = new Small();
128            Functions["degrees"] = new Degrees();
129            // Information
130            Functions["isblank"] = new IsBlank();
131            Functions["isnumber"] = new IsNumber();
132            Functions["istext"] = new IsText();
133            Functions["isnontext"] = new IsNonText();
134            Functions["iserror"] = new IsError();
135            Functions["iserr"] = new IsErr();
136            Functions["error.type"] = new ErrorType();
137            Functions["iseven"] = new IsEven();
138            Functions["isodd"] = new IsOdd();
139            Functions["islogical"] = new IsLogical();
140            Functions["isna"] = new IsNa();
141            Functions["na"] = new Na();
142            Functions["n"] = new N();
143            // Logical
144            Functions["if"] = new If();
145            Functions["iferror"] = new IfError();
146            Functions["ifna"] = new IfNa();
147            Functions["not"] = new Not();
148            Functions["and"] = new And();
149            Functions["or"] = new Or();
150            Functions["true"] = new True();
151            Functions["false"] = new False();
152            // Reference and lookup
153            Functions["address"] = new Address();
154            Functions["hlookup"] = new HLookup();
155            Functions["vlookup"] = new VLookup();
156            Functions["lookup"] = new Lookup();
157            Functions["match"] = new Match();
158            Functions["row"] = new Row(){SkipArgumentEvaluation = true};
159            Functions["rows"] = new Rows(){SkipArgumentEvaluation = true};
160            Functions["column"] = new Column(){SkipArgumentEvaluation = true};
161            Functions["columns"] = new Columns(){SkipArgumentEvaluation = true};
162            Functions["choose"] = new Choose();
163            Functions["index"] = new Index();
164            Functions["indirect"] = new Indirect();
165            Functions["offset"] = new Offset(){SkipArgumentEvaluation = true};
166            // Date
167            Functions["date"] = new Date();
168            Functions["today"] = new Today();
169            Functions["now"] = new Now();
170            Functions["day"] = new Day();
171            Functions["month"] = new Month();
172            Functions["year"] = new Year();
173            Functions["time"] = new Time();
174            Functions["hour"] = new Hour();
175            Functions["minute"] = new Minute();
176            Functions["second"] = new Second();
177            Functions["weeknum"] = new Weeknum();
178            Functions["weekday"] = new Weekday();
179            Functions["days360"] = new Days360();
180            Functions["yearfrac"] = new Yearfrac();
181            Functions["edate"] = new Edate();
182            Functions["eomonth"] = new Eomonth();
183            Functions["isoweeknum"] = new IsoWeekNum();
184            Functions["workday"] = new Workday();
185        }
186    }
187}
Note: See TracBrowser for help on using the repository browser.