Package com.jacob.com

Examples of com.jacob.com.Variant


  public void Refresh() {
    Dispatch.call(this, "Refresh");
  }

  public Field getItem(int Index) {
    return new Field(Dispatch.call(this, "Item", new Variant(Index))
        .toDispatch());
  }
View Full Code Here


    return new Field(Dispatch.call(this, "Item", new Variant(Index))
        .toDispatch());
  }

  public void Append(String Name, int Type, int DefinedSize, int Attrib) {
    Dispatch.call(this, "Append", Name, new Variant(Type), new Variant(
        DefinedSize), new Variant(Attrib));
  }
View Full Code Here

      app.setVisible(false);
    } catch (VisioException ve) {
      System.out.println("ailed to openFile()");
      ve.printStackTrace();
    }
    return new Variant(true);
  }
View Full Code Here

      // call a method on the thread-local Dispatch obtained
      // from the DispatchProxy. If you try to make the same
      // method call on the sControl object - you will get a
      // ComException.
      Variant result = Dispatch.call(sc, "Eval", scriptCommand);
      System.out.println("eval(" + scriptCommand + ") = " + result);
      script.quit();
      System.out.println("called quit");
    } catch (ComException e) {
      e.printStackTrace();
View Full Code Here

    for (int i = 0; i < extractedFromSafeArrayDouble.length; i++) {
      assertEquals("" + i, new Double(sourceData[i]).doubleValue(),
          extractedFromSafeArrayDouble[i]);
    }
    // test conversion
    Variant extractedFromSafeArrayVariant[] = saUnderTest.toVariantArray();
    for (int i = 0; i < extractedFromSafeArrayVariant.length; i++) {
      assertEquals("" + i, sourceData[i],
          extractedFromSafeArrayVariant[i].getShort());
    }
  }
View Full Code Here

    }
    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getBoolean(2));

    // test conversion
    Variant extractedFromSafeArrayVariant[] = saUnderTest.toVariantArray();
    for (int i = 0; i < extractedFromSafeArrayVariant.length; i++) {
      assertEquals("" + i, sourceData[i],
          extractedFromSafeArrayVariant[i].getBoolean());
    }
  }
View Full Code Here

    }
    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getString(2));

    // test conversion
    Variant extractedFromSafeArrayVariant[] = saUnderTest.toVariantArray();
    for (int i = 0; i < extractedFromSafeArrayVariant.length; i++) {
      assertEquals("" + i, sourceData[i],
          extractedFromSafeArrayVariant[i].getString());
    }
  }
View Full Code Here

            .toDispatch();
        System.out.println("Before executa");
        executa(excel, sheets);
        System.out.println("After executa");

        Dispatch.call(workbook, "Close", new Variant(false));
        Dispatch.call(workbooks, "Close");
        System.out.println("After Close");
      } catch (Exception e) {
        e.printStackTrace();
      } finally {
View Full Code Here

     * @return - conte�do da propriedade Value
     */
    public Variant obterValorCelula(String celula, Dispatch sheet) {
      System.out.println("Entered obterValorCelula");
      Dispatch d = obterCelula(celula, sheet);
      Variant returnedValue = Dispatch.get(d, "Value");
      System.out.println("Exiting obterValorCelula");
      return returnedValue;
    }
View Full Code Here

  /**
   *
   */
  public void testVariantSafeArray() {
    Variant sourceData[] = new Variant[] { new Variant(1),
        new Variant(2.3), new Variant("hi") };

    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);
    saUnderTest.fromVariantArray(sourceData);
    Variant[] extractedFromSafeArray = saUnderTest.toVariantArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
View Full Code Here

TOP

Related Classes of com.jacob.com.Variant

Copyright © 2018 www.massapicom. 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.