JXCELL实例学习与研究(六) 之 sheet的分页功能的实现,以及基本EXCEL公式的使用 以及补充函数说明

时间:2022-08-04 20:24:16

代码比较长,主要教如何使用分页,EXCEL公式,以及SHEET1调用SHEET2数据的方式

import com.jxcell.CellException;
import com.jxcell.View;

import java.io.IOException;

public class FomulaSample
{
    public FomulaSample()
    {}

    public static void main(String args[])
    {
        View m_view = new View();
        int rowIndex = 0;

        try
        {
            //Sets the number of worksheets in this workbook
            m_view.setNumSheets(2);
            // set sheet names
            m_view.setSheetName(0,"sheet1");
            m_view.setSheetName(1,"sheet2");
            // select the first sheet
            m_view.setSheet(0);

            //set column width,units equal to 1/256th of the character 0's width in the default font
            m_view.setColWidth(0,35*256);
            m_view.setColWidth(1,15*256);
            m_view.setColWidth(2,15*256);

            m_view.setTextAsValue(rowIndex++, 0, "Examples of typical formulas usage:");
            m_view.setTextAsValue(++rowIndex, 0, "Some data:");

            m_view.setTextAsValue(rowIndex, 1, "3");   // enter number as text
            m_view.setNumber(rowIndex, 2, 4.1);
            m_view.setTextAsValue(++rowIndex, 1, "5.2");
            m_view.setNumber(rowIndex, 2, 6);
            m_view.setTextAsValue(++rowIndex, 1, "7");
            m_view.setNumber(rowIndex++, 2, 8.3);

            // Named ranges.
            String namedRange = "Range1";
            m_view.setDefinedName(namedRange, "$B$3:$C$4" );

            // Floats without first digit.
            m_view.setText( ++rowIndex, 0 , "Float number without first digit:");
            //Sets the formula,The formula string should not have a leading equal sign (=)
            m_view.setFormula(rowIndex, 1 , ".5/23+.1-2");

            // Function using named range.
            m_view.setText(++rowIndex, 0, "Named range:");
            m_view.setFormula(rowIndex, 1, "SUM(" + namedRange + ")");

            // 3D sheet references.
            m_view.setText(++rowIndex, 0, "3d sheet reference:");
            m_view.setFormula(rowIndex, 1, "sheet2!$C$2");

            // 3D area sheet references.
            m_view.setText(++rowIndex, 0, "3d area sheet reference:");
            m_view.setFormula(rowIndex, 1, "AVERAGE(sheet2!A2:C2)");

            // Function's miss argument.
            m_view.setText(++rowIndex, 0, "Function's miss arguments:");
            m_view.setFormula(rowIndex, 1, "Count(1,  ,  ,,,2, 23,,,,,, 34,,,54,,,,  ,)");

            // Functions are case-insensitive.
            m_view.setText(++rowIndex, 0, "Functions are case-insensitive:");
            m_view.setFormula(rowIndex, 1, "cOs( 1 )");

            // Functions.
            m_view.setText(++rowIndex, 0, "Supported functions:");

            String nextFunction = null;
            m_view.setText(++rowIndex, 0, "Results");
            m_view.setText(rowIndex++, 1, "Formulas");

            nextFunction = "NOW()+123";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "SECOND(12)/23";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "MINUTE(24)-1343/35";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "(HOUR(56)-23/35)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "WEEKDAY(5)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "YEAR(23)-WEEKDAY(5)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "MONTH(3)-2342/235345";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "((DAY(1)))";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "TIME(1,2,3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "DATE(1,2,3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "RAND()";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "TEXT(\"text\", \"$d\")";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "VAR(1,2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "MOD(1,2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "NOT(FALSE)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "OR(FALSE)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "AND(TRUE)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "FALSE()";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "TRUE()";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "VALUE(3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "LEN(\"hello\")";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "MID(\"hello\",1,1)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "ROUND(1,2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "SIGN(-2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "INT(3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "ABS(-3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "LN(2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "EXP(4)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "SQRT(2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "PI()";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "COS(4)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "SIN(3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "MAX(1,2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "MIN(1,2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "AVERAGE(1,2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "SUM(1,3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "IF(1,2,3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "COUNT(1,2,3)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            nextFunction = "SUBTOTAL(1,sheet2!A2:C2)";
            m_view.setFormula(rowIndex, 0, nextFunction);
            m_view.setText(rowIndex++, 1, nextFunction);

            // Paranthless checks.
            m_view.setText(++rowIndex, 0, "Paranthless:");
            m_view.setFormula(rowIndex, 1, "((12+2343+34545))");

            // Unary operators.
            m_view.setText(++rowIndex, 0, "Unary operators:");
            m_view.setFormula(rowIndex, 1, "B5%");
            m_view.setFormula(rowIndex, 2, "+++B5");

            // Operand tokens, bool.
            m_view.setText(++rowIndex, 0, "Bool values:");
            m_view.setFormula(rowIndex, 1, "TRUE");
            m_view.setFormula(rowIndex, 2, "FALSE");

            // Operand tokens, int.
            m_view.setText(++rowIndex, 0, "Integer values:");
            m_view.setFormula(rowIndex, 1, "1");
            m_view.setFormula(rowIndex, 2, "20");

            // Operand tokens, num.
            m_view.setText(++rowIndex, 0, "Float values:");
            m_view.setFormula(rowIndex, 1, ".4");
            m_view.setFormula(rowIndex, 2, "2235.5132");

            // Operand tokens, str.
            m_view.setText(++rowIndex, 0, "String values:");
            m_view.setFormula(rowIndex, 1, "\"hello world!\"");

            // Operand tokens, error.
            m_view.setText(++rowIndex, 0, "Error values:");
            m_view.setFormula(rowIndex, 1, "#NULL!");
            m_view.setFormula(rowIndex, 2, "#DIV/0!");

            // Binary operators.
            m_view.setText(++rowIndex, 0, "Binary operators:");
            m_view.setFormula(rowIndex, 1, "(1)-(2)+(3/2+34)/2+12232-32-4");

            // Another sheet.
            m_view.setSheet(1);
            rowIndex = 0;
            m_view.setText(rowIndex++, 0, "Some data on another sheet:");
            m_view.setNumber(rowIndex, 0, 33);
            m_view.setNumber(rowIndex, 1, 44.1);
            m_view.setNumber(rowIndex, 2, 55.2);
            m_view.setNumber(++rowIndex, 0, 66);
            m_view.setNumber(rowIndex, 1, 77);
            m_view.setNumber(rowIndex, 2, 88.3);

            m_view.write(".\\FormulaSample.xls");
//            Designer.newDesigner(m_view);
        }
        catch (CellException e)
        {
            e.printStackTrace();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }
}


补充函数说明如下:

import com.jxcell.CellException;
import com.jxcell.CellFormat;
import com.jxcell.View;
import com.jxcell.designer.Designer;

import java.io.IOException;

public class FormulaTest
{
    public static void main(String args[])
    {
        try
        {
            View m_view = new View();
            int rowIndex = 0;

            //set column width,units equal to 1/256th of the character 0's width in the default font
            m_view.setColWidth(0,10*256);
            m_view.setColWidth(1,25*256);
            m_view.setColWidth(2,25*256);
            m_view.setColWidth(4,14*256);
            m_view.setColWidth(5,14*256);

            m_view.setText(rowIndex, 1 , "result");
            m_view.setText(rowIndex, 2, "formula");

            String nextFunction = "ABS(-1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ACOS(.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ACOSH(1.2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ADDRESS(5,5,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "AND(TRUE(), FALSE())";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "AREAS(B2:C3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ASIN(1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ASINH(5.3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ATAN(3.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ATAN2(3, 6)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ATANH(.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "AVEDEV(1,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "AVERAGE(E2:E6)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "AVERAGEA(1,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BESSELI(3,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BESSELJ(2.5,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BESSELK(5,10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BESSELY(3,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BETADIST(0.5, 10, 1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BETAINV(0.5, 1, 1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BIN2DEC(10000000)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BIN2HEX(111111)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BIN2OCT(1110100)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "BINOMDIST(6,10,0.5,FALSE)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CEILING(1.23459, .05)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CELL(\"width\",C4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CHAR(70)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CHIDIST(9.6,10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CHIINV(0.05,5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CHOOSE(2,\"Q1\", \"Q2\", \"Q3\", \"Q4\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CLEAN(\"Payments \" & CHAR(8) & \"Due\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CODE(\"A\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COLUMN(B3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COLUMNS(A1:D5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CONCATENATE (\"Sale \", \"Price\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CONFIDENCE(0.05, 2.5, 50)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COMPLEX(2,3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CONVERT(1,\"m\",\"yd\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CORREL({4,7,9},{1,2,3})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COS(5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COSH(2.10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUNT(5, 6, \"Q2\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUNTA(32, 45, \"Earnings\", \"\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUNTBLANK(A1:D2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUNTIF(C38:C40,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUPDAYBS(DATE(93,1,25),DATE(94,8,31),2,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUPDAYS(DATE(93,1,25),DATE(94,8,31),2,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUPDAYSNC(DATE(93,1,25),DATE(94,8,31),2,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUPNCD(DATE(93,1,25),DATE(94,8,31),2,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUPNUM(DATE(93,1,25),DATE(94,8,31),2,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COUPPCD(DATE(93,1,25),DATE(94,8,31),2,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "COVAR({1,2,3,4,5},{2,4,6,8,10})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CRITBINOM(1000,0.5,0.3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CUMIPMT(0.009166667,60,17000,1,60,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "CUMPRINC(0.009166667,60,17000,1,34,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DATE(94, 6, 21)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DATEDIF(NOW(),DATE(2008,8,8),\"d\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DATEVALUE(\"3/6/05\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DAVERAGE(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DAY(34399)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DAYS360(\"1/11/06\", \"2/11/06\") ";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DB(10000, 1000, 7, 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DCOUNT(D1:F5,\"Salary\",E6:E7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DCOUNTA(D1:F5,\"Employee\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DDB(10000,1000, 7, 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DEC2BIN(256)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DEC2HEX(10,5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DEC2OCT(100)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DEGREES(6.283185307)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DELTA(6,7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DEVSQ(1, 2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DGET(D1:F5,\"Employee\",E6:E7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DISC(DATE(92,7,15),DATE(95,12,30),93,100)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DMAX(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DMIN(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DOLLAR(1023.789)";              //local currency
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DOLLARDE(25.3,4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DOLLARFR(25.25,4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DPRODUCT(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DSTDEV(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DSTDEVP(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "DSUM(D1:F5,\"Salary\",F6:F7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EDATE(DATE(2007,1,1),2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EFFECT(0.0675,12)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EOMONTH(DATE(2007,1,1),2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ERF(2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ERFC(1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ERROR.TYPE(B76)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EVEN(2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EXACT(\"Match\", \"Match\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EXP(2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "EXPONDIST(0.5,1,TRUE)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FACT(2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FACTDOUBLE(15)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FALSE()";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FDIST(2, 3, 4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FIND(\"time\", \"There’s no time like the present\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FINV(0.05, 1, 4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FISHER (0.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FISHERINV(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FIXED(2000.5, 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FLOOR(1.23459, .05)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FORECAST(0.5, {1, 2, 4, 6, 7, 9}, {0, 2, 4, 5, 7, 8})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FTEST({51,45,41,27},{91,37,89,82})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FV(5%,8,-500)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "FVSCHEDULE(1000,{0.2,0.21,0.22})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GAMMADIST (12, 3, 7, TRUE)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GAMMAINV (0.01, 8, 2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GAMMALN(5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GCD({1234567890,3000})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GEOMEAN(24, 6)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GESTEP(6,7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "GROWTH({4,6,8,9},,3.5,TRUE)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HARMEAN(5,4,25,60,14,26)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HEX2BIN(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HEX2DEC(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HEX2OCT(100)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HLOOKUP(\"Northeast\",B1:E5,3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HOUR(34259.4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "HYPERLINK(\"http://www.jxcell.net\",\"java spreadsheet component\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IF(A1>10, \"Greater\", \"Less\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMABS(\"3+4i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMAGINARY(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMARGUMENT(\"1+1i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMCONJUGATE(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMCOS(\"2+i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMDIV(\"-10+10i\",\"1+2i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMEXP(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMLN(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMLOG10(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMLOG2(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMPOWER(\"1+2i\",2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMPRODUCT(\"1+2i\",30)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMREAL(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMSIN(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMSQRT(\"2+3i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMSUB(\"2+3i\",\"3+4i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IMSUM(\"2+3i\",\"3+4i\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "INDEX(A2:B6,3,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "INDIRECT(B5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "INFO(\"release\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "INT(10.99)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IPMT(8%/12, 2, 48, 18000)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "IRR(E2:E5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISBLANK(A1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISERR(A1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISERROR(1/0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISEVEN(9.8)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISLOGICAL(ISBLANK(A1))";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISNA(A1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISNONTEXT(A3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISNUMBER(123.45)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISODD(9.8)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISREF(A3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ISTEXT(\"2nd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LCM(15,20)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LEFT(\"2nd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LEN(\"3rd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LN(12.18)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LOG(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LOG10(260)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LOGINV(0.223218,18,20)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LOGNORMDIST(16,18,20)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LOOKUP(\"Mike\", D2:D5, E2:E5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "LOWER(\"3rd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MATCH(7600, B2:B7,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MAX(50, 100, 150, 500, 200)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MAXA(50,100,150,\"500\",200)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MEDIAN(1,2,3,4,5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MID(\"Travel Expenses\", 8, 8)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MIN(50, 100, 150, 500, 200)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MINA(50,100,150,\"500\",200)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MINUTE(34506.4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MIRR(E2:E5, 12%, 8%)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MOD(-23,3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MODE(1,2,3,3,4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MONTH(34626)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "MROUND(13,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "N(A4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "NA()";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "NETWORKDAYS(1,365)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "NOT(TRUE())";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "NOW()";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "NPER(12%/12,-350,-300,16000,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "NPV(8%,-12000,3000,3000,3000,7000)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "OCT2BIN(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "OCT2DEC(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "OCT2HEX(10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ODD(3.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "OFFSET(B1, 3, 2, 1, 1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "OR(1 + 1 = 1, 5 + 5 = 10)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PEARSON({2,5,8},{3,6,7})";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PERCENTILE({1,2,3,4,5}, .25)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PERCENTRANK ({1, 2, 3, 4, 5}, 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PERMUT(4,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PI()";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PMT(8%/12, 48, 18000)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "POISSON(15,15,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "POWER(3,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PRICE(DATE(97,4,19),DATE(2001,11,25),0.05,0.075,100,4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PROPER(\"3rd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "PV(8%/12, 48, 439.43)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "QUOTIENT(9,7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "RADIANS(-180)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "RAND()*10";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "RANDBETWEEN(15,47)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "RATE(48,-439.43,18000)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "RECEIVED(DATE(94,1,1),DATE(97,10,1),50,0.0575)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "REPLACE(\"For the year: 1993\",18,1,\"4\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "REPT(\"error-\", 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "RIGHT(\"2nd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ROMAN(499)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ROUND(123.456, 2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ROUNDDOWN(3.14159, 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ROUNDUP(76.9,0)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ROW(B3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ROWS(A1:D5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SEARCH(\"?5\", \"Bin b45\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SECOND(.259)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SIGN(-123)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SIN(45)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SINH(1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SLN(10000, 1000, 7)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SQRT(9)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SQRTPI(2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "STANDARDIZE (95, 50, 4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "STDEV(4.0, 3.0, 3.0, 3.5, 2.5, 4.0, 3.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "STDEVA(4.0, 3.0, 3.0, 3.5, 2.5, \"4.0\", 3.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "STDEVP(4.0, 3.0, 3.0, 3.5, 2.5, 4.0, 3.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "STDEVPA(4.0, 3.0, 3.0, 3.5, 2.5, \"4.0\", 3.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SUBTOTAL(1,E2:E5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SUM(1000, 2000, 3000)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SUMIF(A1:B2,\"=0\",A4:B5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SUMPRODUCT(E2:E3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SUMSQ(9, 10, 11)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "SYD(10000, 1000, 7, 3)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "T(\"Report\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TAN(0.645)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TANH(-2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TDIST(1.75,3,1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TEXT(123.62, \"0.000\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TIME(12, 26, 24)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TIMEVALUE(\"1:43:43 am\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TINV (0.01, 2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TODAY()";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TRIM(\" Level 3, Gate 45 \")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TRUE()";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TRUNC(123.456, 2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "TYPE(A1)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "UPPER(\"3rd Quarter\")";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "USDOLLAR(1023.789)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VALUE(9800)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VAR(4.0, 3.0, 3.5, 2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VARA(4.0, 3.0, \"3.5\", 2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VARP(4.0, 3.0, 3.5, 2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VARPA(4.0, 3.0, \"3.5\", 2.5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VDB(10000, 1000, 7, 3, 4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "VLOOKUP(\"Jone\",D2:E5,2)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "WEEKDAY(34399.92)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "WEIBULL(100,3,120,TRUE)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "WORKDAY(DATEVALUE(\"2007/01/03\"),5)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "YEAR(34328)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "YEARFRAC(DATE(97,1,11),DATE(97,5,15))";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "YIELD(DATE(97,5,6),DATE(99,12,31),0.06,0.92,100,4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "YIELDDISC(DATE(94,10,23),DATE(95,7,7),98.31,100)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);
            nextFunction = "ZTEST ({1,2,3}, 4)";
            m_view.setFormula(++rowIndex, 1 , nextFunction);
            m_view.setText(rowIndex, 2, nextFunction);

            // Sample data
            m_view.setText(0, 3, "Employee");
            m_view.setText(0, 4, "Income");
            m_view.setText(0, 5, "Salary");
            m_view.setText(1, 3, "Mike");
            m_view.setText(2, 3, "Jone");
            m_view.setText(3, 3, "Peter");
            m_view.setText(4, 3, "Johanson");
            m_view.setNumber(1, 4, 15000);
            m_view.setNumber(2, 4, 25000);
            m_view.setNumber(3, 4, -65000);
            m_view.setNumber(4, 4, 28000);
            m_view.setNumber(1, 5, 15000);
            m_view.setNumber(2, 5, 25000);
            m_view.setNumber(3, 5, 30000);
            m_view.setNumber(4, 5, 27000);
            m_view.setText(5, 4, "Income");
            m_view.setText(6, 4, "<0");
            m_view.setText(5, 5, "Income");
            m_view.setText(6, 5, ">0");
            m_view.setSelection(0, 4, 4, 5);
            CellFormat cfm = m_view.getCellFormat();
            cfm.setCustomFormat("$#,##0.00;[Red]$#,##0.00");
            m_view.setCellFormat(cfm);

            m_view.recalc();

            m_view.write(".\\formulatest.xls");
            Designer.newDesigner(m_view);
        }
        catch (CellException e)
        {
            e.printStackTrace();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }
}