Examples of XLOper


Examples of org.boris.jxll.XLOper

        XLOper[] a = new XLOper[fi.type.types.length];
        for (int i = 0; i < a.length; i++) {
            if (i < args.length) {
                a[i] = convert(args[i]);
            } else {
                a[i] = new XLOper();
                a[i].type = XLOperType.xltypeMissing;
            }
        }
        XLOper x = addin.invoke(name, a);
        XLoper r = convert(x);
        return r;
    }
View Full Code Here

Examples of org.boris.jxll.XLOper

    public FunctionInformation[] getFunctions() {
        return info;
    }

    private XLOper convert(XLoper x) {
        XLOper o = new XLOper();
        if (x instanceof XLArray) {
            o.type = XLOperType.xltypeMulti;
            XLArray a = (XLArray) x;
            o.rows = a.rows;
            o.cols = a.columns;
View Full Code Here

Examples of org.boris.jxll.XLOper

        // Register the double arg function
        a.registerFunction(new FunctionInformation("DoubleArg", "BB"));

        // Call the double arg function
        XLOper res = a.invoke("DoubleArg", new Double(2.));

        // Display the result
        System.out.println(res.num);

        // Free the addin
View Full Code Here

Examples of org.boris.jxll.XLOper

            return;
        }
        double a1 = Math.round(Math.random() * 60000) / 100.;
        double a2 = Math.round(Math.random() * 4000) / 100.;
        System.out.println("Invoking TestSum(" + a1 + "," + a2 + ")");
        XLOper res = a.invoke("TestSum", new Double(a1), new Double(a2));
        System.out.println(res.num);
    }
View Full Code Here

Examples of org.boris.xlloop.xloper.XLoper

    public void add(String name, boolean value) {
        map.put(name, new XLBool(value));
    }

    public String getString(String name) {
        XLoper x = map.get(name);
        if (x instanceof XLString)
            return ((XLString) x).str;
        if (x == null)
            return null;
        return x.toString();
    }
View Full Code Here

Examples of org.boris.xlloop.xloper.XLoper

            JSONException {
        BufferedWriter bw = new BufferedWriter(output);
        try {
            FunctionRequest fr = JSONCodec.decodeRequest(input);
            System.out.println(JSONCodec.encodeRequest(fr).toString(4));
            XLoper res = handler.execute(null, fr.getName(), fr.getArgs());
            System.out.println(JSONCodec.encode(res).toString(4));
            JSONCodec.encodeXLoper(res, bw);
        } catch (RequestException e) {
            e.printStackTrace();
            XLoper res = new XLString(e.getMessage());
            JSONCodec.encodeXLoper(res, bw);
            bw.flush();
        } finally {
            if (bw != null)
                bw.flush();
View Full Code Here

Examples of org.boris.xlloop.xloper.XLoper

            return null;
        return x.toString();
    }

    public Double getDouble(String name) {
        XLoper x = map.get(name);
        if (x instanceof XLNum)
            return ((XLNum) x).num;
        else if (x instanceof XLInt)
            return (double) ((XLInt) x).w;
        else if (x instanceof XLBool)
View Full Code Here

Examples of org.boris.xlloop.xloper.XLoper

            return;
        }

        for (int i = 0; i < array.length; i += 2) {
            String key = array.array[i].toString();
            XLoper value = array.array[i + 1];
            map.put(key, value);
        }
    }
View Full Code Here

Examples of org.boris.xlloop.xloper.XLoper

    public XLoper get(int index) {
        return (XLoper) list.get(index);
    }

    public String getString(int index) {
        XLoper x = get(index);
        if (x instanceof XLString)
            return ((XLString) x).str;
        return null;
    }
View Full Code Here

Examples of org.boris.xlloop.xloper.XLoper

            maxCol = column;
        values.put(new ArrayRef(row, column), value);
    }

    public String getString(int row, int column) {
        XLoper x = get(row, column);
        if (x instanceof XLString)
            return ((XLString) x).str;
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.