Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you have OpenOffice installed, then you can use the "OpenOffice SDK" (<a href="http://www.openoffice.org/api/SDK/index.html" rel="noreferrer">current version here</a>) to control that instance from several programming environments, including .NET. You can use OpenOffice this way to accomplish a number of different things; one example is converting files from one file format to another. It's analogous to how you can control Microsoft Office via COM.</p> <p>A set of CLI/.NET bindings come with the SDK, and are by default installed in (<em>example for SDK v3.0</em>):</p> <blockquote> <p>C:\Program Files\OpenOffice.org_3.0_SDK\sdk\cli</p> </blockquote> <p>I've found Mark Alexander Bain's <a href="http://c-programming.suite101.com/article.cfm/creating_an_openoffice_calc_document_with_c" rel="noreferrer">Creating an OpenOffice Calc Document with C#</a> to be the most straightforward, hands-on, introductory article to controlling OpenOffice that way.</p> <p>The CLI bindings are mostly a port/mapping of the non-.NET object model, so you'll want to get into things like the non-.NET-specific OpenOffice API <a href="http://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide" rel="noreferrer">Developer's Guide</a>.</p> <p>So far the main difference I've found between the CLI bindings and the other documentation is that with the CLI bindings you cast an object to a new interface using normal .NET cast syntax rather than with the UnoRuntime.queryInterface() method. For example, instead of</p> <pre><code>XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class, desktop); </code></pre> <p>just use</p> <pre><code>XComponentLoader xComponentLoader = (XComponentLoader)desktop; </code></pre> <p>There are also some pretty technical docs of how the OpenOffice/UNO stuff gets mapped onto .NET concepts in the CLI binding here: <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/CLI/CLI_Language_Binding" rel="noreferrer">http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/CLI/CLI_Language_Binding</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload