Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » 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 #1781104] Thu, 01 February 2018 13:04
Lalit Solanki is currently offline Lalit SolankiFriend
Messages: 153
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:08]

Report message to a moderator

Previous Topic:UML Overview of SWT-Classes
Next Topic:ExpandItem
Goto Forum:
  


Current Time: Mon May 06 17:33:49 GMT 2024

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

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

Back to the top