[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Load Excel workbook without any options (commands)

Duong Nguyen, thank you for answering second time.

I totally agree with you but somehow I couldn't understand the basics of getting properties and sub-properties of an automation in Java. For example I can disable all commandbars in VB:

For Each Cbar In Application.CommandBars
  Cbar.Enabled = False
Next

But I'm not able to achieve this in Java, I tried:

int[] barIds = application.getIDsOfNames(new String[] { "CommandBars" });

for(int i=0; i<barIds.length; i++)
 System.out.println(application.getName(toolbarIds[i]));

In my previous post, I forgot to mention that it opens in a separate window when I have Excel 2007 installed on my machine. For excel 2003, Snippet261 works perfectly OK.

Thanks