Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Failed to open both Excel document and SWT application with Win32OLE embedded objects same time.
Failed to open both Excel document and SWT application with Win32OLE embedded objects same time. [message #1781105] Thu, 01 February 2018 13:07
Lalit Solanki is currently offline Lalit SolankiFriend
Messages: 142
Registered: April 2015
Senior Member
Hi Team,

I am having issue with Win32OLE opening Excel documents with embedded objects over Windows 64 bits. I can open both SWT application with OLE embedded object and Excel documents separately for review my each updates in the sheet.

However, I am not able to open both Excell documents and SWT application with OLE object in Windows 64 bits.

I am using the following environment :

1. JDK : jdk1.8.0_91 64-Bit
2. OS : Windows 7 Professional 64-Bit
3. Service Pack 1
3. JAR : jre1.8.0_91 64-Bit
4. Microsoft Office 2016 64-Bit

Here is my code :
-------------------------------------------------------------------------------------------
OleClientSite clientSite ;
try {
clientSite = new OleClientSite(frame, SWT.NONE, new File(filelocation));
} catch (SWTException e) {
e.printStackTrace();
disposeClient();
}

if (clientSite != null){
clientSite.doVerb(OLE.OLEIVERB_SHOW); // Show property use
hideToolbars(clientSite);
}

//Hide Toolbar and menubar
public static void hideToolbars(OleClientSite site) {
int result = site.queryStatus(OLE.OLECMDID_HIDETOOLBARS);
if ((result & OLE.OLECMDF_SUPPORTED) == OLE.OLECMDF_SUPPORTED) {
site.exec(OLE.OLECMDID_HIDETOOLBARS, OLE.OLECMDEXECOPT_DODEFAULT, new Variant(), new Variant());
}
}
// Dispose object
void disposeClient() {
if (clientSite != null)
clientSite.dispose();
clientSite = null;
}

Thanks
Lalit


Lalit

[Updated on: Fri, 02 February 2018 07:07]

Report message to a moderator

Previous Topic:MalformedURLException for Welcome (intro) page on 64-bit RHEL
Next Topic:Show log4j logs in Eclipse RCP consoleView
Goto Forum:
  


Current Time: Wed Sep 19 05:00:31 GMT 2018

Powered by FUDForum. Page generated in 0.03148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top