Ole Frame无法在Linux环境中打开Excel文件

时间:2019-04-05 10:48:50

标签: java linux apache-poi eclipse-rcp ole

我使用OLE框架设置了应用程序(RCP)以进行就地编辑。OleFrame无法在linux(CentOS7)环境中打开excel文件。我正在使用 Apache OpenOffice 4.1.2。

private void createExcelPart(Shell shell) 
{ 
    //OleFrame is actually a Composite for placing OLE controls 
    OleFrame oleFrame = new OleFrame(shell,SWT.NONE); 

    //OleClientSite provides a place to embed an OLE object into a container, where the OLE object represented by "Excel.Sheet" is Excel. 
    OleClientSite clientSite = new OleClientSite(oleFrame,SWT.NONE,"Excel.Sheet"); 

    setValueForA1Cell(clientSite); 

    //OleClientSite action when displaying OLE object, the action here is OLEIVERB_SHOW, display 
    clientSite.doVerb(OLE.OLEIVERB_SHOW); 
} 

目标环境:

BootLoader常数:OS = linux,ARCH = x86_64,WS = gtk,NL = zh_CN  命令行参数:-os linux -ws gtk -arch x86_64

  

MESSAGE应用程序错误

java.lang.Error: Unresolved compilation problems: 
The import org.eclipse.swt.ole cannot be resolved

OleFrame cannot be resolved to a type
OleClientSite cannot be resolved to a type
OLE cannot be resolved to a variable

请给我任何解决方案。谢谢

0 个答案:

没有答案