com4j icon indicating copy to clipboard operation
com4j copied to clipboard

Is late binding with Com4j possible?

Open lawern opened this issue 10 years ago • 0 comments

Hello,

looking for a solution to use Excel COM objects in Java I found Com4j. Until now I was able to implement a lot of code, but I am now encountered a problem with the CustomProperties in Excel Workbooks. Tlbimp generates correct Workbook and DocumentProperties classes, but the following command unfortunately returns "null":

DocumentProperties customDocumentProperties = workbook.customDocumentProperties().queryInterface(DocumentProperties.class);

The problem is not new and occurs also for C#. A solution for C# is described here:

  • http://stackoverflow.com/questions/1137763/accessing-excel-custom-document-properties-programatically

Is the there described late binding approach in Com4j also possible? Or knows someone another way to get the right DocumentProperties object?

Many Thanks!

Lars

lawern avatar Jun 08 '15 07:06 lawern