java - Ole Frame在Linux环境下无法打开excel文件
问题描述
我设置了一个带有 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=en_US 命令行参数:-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
请给我任何解决方案。谢谢
解决方案
推荐阅读
- android - 如何在android中创建具有左上角和右上角的布局?
- bash - 使用 mv 命令移动包含空格的文件
- msbuild - 如何在 Visual Studio 中重新导入 .targets 文件?
- nativescript - 如何修改 Back Stack - NativeScript
- excel - 为什么我不能点击提交按钮(91 错误 438 错误 VBA)?
- email - 更新电子邮件帐户密码后,通过电子邮件获取问题停止工作
- python - Python:怎么可能有一个变量的值而不是它的地址
- xlib - libXm 从小部件获取显示编号
- sql - 将 SQL 中的数据与列中的数据合并
- javascript - 如何将 npm 包中的 JS 文件包含到 Nuxt.js 中的单独页面