try {
_Application app = excel.ClassFactory.createApplication();
Variant _ = Variant.getMissing();
app.setVisible(0, false);
app.setDisplayAlerts(0, false);
_Workbook wb = app.getWorkbooks().open("E:/QQPCmgr/Desktop/03070313.xls", _, _, _, _, _, _, _, _, _, _, _, _, _, _, 0);
Variant html = new Variant(Variant.Type.VT_INT);
html.set(30);
Sheets sheets = wb.getSheets();
_Worksheet sheet = sheets.getItem(1).queryInterface(_Worksheet.class);
Range range = sheet.getCells();
Object[] objs=(Object[])range.getValue(String.class);
for (int i = 0; i < objs.length; i++) {
System.out.println(objs[i]);
}
//wb.saveAs("d:/html/1234.html", XlFileFormat.xlHtml, _, _, _, false,XlSaveAsAccessMode.xlNoChange, _, _, _, _, _, 0);
Variant saveBeforeExit = new Variant(Variant.Type.VT_BOOL);
saveBeforeExit.set(1);
wb.close(XlSaveAction.xlSaveChanges, _, _, 0);
app.quit();
} catch (Exception e) {
e.printStackTrace();
}
}