public static int xls2pdf(String srcPath, String destPath) {
		File file = new File(srcPath);
		if (file.exists()) {
			ComThread.InitMTA();
			ActiveXComponent excel = null;
			try {
				excel = new ActiveXComponent("Excel.Application");
				excel.setProperty("Visible", new Variant(false));
				Dispatch workbooks = excel.getProperty("Workbooks")
						.toDispatch();
				log.info("使用MS Excel打开文档..." + srcPath);
				Dispatch workbook = Dispatch.call(workbooks, "Open", srcPath,
						false, true).toDispatch();
				log.info("转换文档到PDF..." + destPath);

				File toFile = new File(destPath);
				if (toFile.exists()) {
					toFile.delete();
				}
				Dispatch.call(workbook, "ExportAsFixedFormat", EXCELFORMATPDF,
						destPath);
				Dispatch.call(workbook, "Close", false);
			} catch (Exception e) {
				log.error("调用MS Excel转换失败:" + e.getMessage());
			} finally {
				if (excel != null) {
					log.info("退出Excel");
					excel.invoke("Quit");
				}
				ComThread.Release();
			}
		}
		log.info("文档不存在...");
		return TRANSFERFAILURE;
	}