ActiveXComponent app = null;
Dispatch excel = null;
ComThread.InitSTA();
app = new ActiveXComponent("Excel.Application");// 创建一个PPT对象
app.setProperty("Visible", new Variant(false)); // 不可见打开
app.setProperty("DisplayAlerts", "False");
Dispatch excels = app.getProperty("Workbooks").toDispatch();// 获取文挡属性
System.out.println("打开文档 >>> " + inputFile);
// 调用Documents对象中Open方法打开文档,并返回打开的文档对象Document
excel = Dispatch.call(excels, "Open", inputFile, false, true).toDispatch();
运行到这里就卡死了