Results 1 to 5 of 5

Thread: Automation OpenOffice using Java

  1. #1
    Join Date
    Apr 2010
    Posts
    87

    Automation OpenOffice using Java

    I have written coding which is a small example of the simple automation of Open Office scalc Spreadsheets with Java via the UN. I am using Open Office version: 2.4.0. I am getting the following issue after compiling the code :
    Code:
    Any [Type [com.sun.star.table.XCell], [Proxy: 3195425.7 d81688; msci [0]; 9eb8c73d1d5749528db88bd98c4e3d1c, Type [com.sun.star.table.XCell]]]
     1.0
     Any [Type [com.sun.star.table.XCell], [Proxy: 18,426,253.7 aff978; msci [0]; 9eb8c73d1d5749528db88bd98c4e3d1c, Type [com.sun.star.table.XCell]]]
     2.0
     Closing ...
    I am not having any idea about this problem. I hope that someone over there should be knowing about it. Please help me as early as possible.

  2. #2
    Join Date
    Dec 2008
    Posts
    202

    Re: Automation OpenOffice using Java

    I'm very intrigued by your convert function and would also like to use for my development with OO, but I would understand it better before. The sticking point is that I do not understand how the second parameter is passed and how the syntax is exactly.
    • convert (Object instance, TTarget ... args)

    The function call you are using only one parameter, which can then be in the function with instance. The second parameter is, however, apparently the guy who should be cast in what connection at last. I do not understand how it is passed and unfortunately I could find no clue how this kind of parameter passing is and where it is documented. What technology is used? I went through the changes to Java 1.5 in detail and there is this kind of parameter passing is not mentioned.

  3. #3
    Join Date
    Dec 2008
    Posts
    161

    Re: Automation OpenOffice using Java

    It is called "variadic" functions. In computer programming, a Variadic function is a function of imprecise arity, ie, one which recognizes a variable number of arguments. Support for Variadic functions fluctuates widely among programming languages. There are numerous mathematical and logical operations that logically come across as Variadic functions. For illustration, the summing of numbers or the concatenation of strings or other progressions are operations that can logically pertain to any number of operands. Another operation that has been implemented as a Variadic function in various lingos is output formatting. The C function printf and the Common Lisp function format are two such illustrations. Both take one argument that identifies the formatting of the output, and any number of arguments that afford the values to be formatted.

  4. #4
    Join Date
    Jan 2006
    Posts
    211

    Re: Automation OpenOffice using Java

    In precedent releases, a method that took a random number of ethics required you to generate an array and put the values into the array preceding to invoking the method. For example, here is how one used the MessageFormat class to format a message:
    Code:
    Object [] arguments = (
         new Integer (7)
         new Date (),
         "A disturbance in the Force"
     );
    
     String result = MessageFormat.format (
         "At (1, time) on (1, date), there was (2) on planet"
          + "(0, number, integer).", Arguments);

  5. #5
    Join Date
    Jan 2009
    Posts
    143

    Re: Automation OpenOffice using Java

    The three periods after the concluding parameter's type designate that the ultimate argument may be passed as an array or as a succession of arguments. Varargs can be used only in the ending argument situation. Given the innovative varargs declaration for MessageFormat.format, the exceeding invocation may be replaced by the following shorter and sweeter invocation:
    Code:
     String result = MessageFormat.format (
         "At (1, time) on (1, date), there was (2) on planet"
         + "(0, number) integer."
         7, new Date (), "a disturbance in the Force");

Similar Threads

  1. Automation Center’s in Chennai.
    By Micro-Dona in forum Education Career and Job Discussions
    Replies: 3
    Last Post: 13-03-2012, 08:51 PM
  2. AppleScript Automation
    By brickwork in forum Software Development
    Replies: 1
    Last Post: 26-07-2010, 01:36 PM
  3. Outlook automation with Visual Basic
    By Rutajit in forum Software Development
    Replies: 2
    Last Post: 07-05-2009, 11:41 PM
  4. Automation Error 440
    By Harshini in forum Software Development
    Replies: 4
    Last Post: 06-05-2009, 03:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,291,886.20860 seconds with 17 queries