请问各位大侠,怎么利用jacob,使得打开word文档时,立即选择了"工具->修订"项?谢谢 不会吧?没有人理会?只有自己顶了...希望大家帮忙呀,小弟谢谢先1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是JACOB操作EXCEL文件的,希望对你有用packagecom.livedoor.finance.credit.admin.business.event.util;importcom.jacob.com.Variant;importcom.jacob.com.Dispatch;importcom.jacob.com.ComThread;importcom.jacob.activeX.ActiveXComponent;/***@authorDarren.Wang* 2005/03/17*ThankstoSamir(whoisinAustralia),withouthishelp,Ican'tcompletethiswork.*/publicclassJacobExcelLauncher{//excelautomationprivateActiveXComponentexcel;//excelworkbooksprivateDispatchworkbooks;//excelfilevarientprivateVariantworkbook;/**constructoroftheJacobExcelLauncher*@authorDarren.Wang*/publicJacobExcelLauncher(){//starttheExcelexcel=newActiveXComponent("Excel.Application";//firsttime,weneedsettheexceltobeinvisibleexcel.setProperty("Visible",newVariant(false));//getworkbooksworkbooks=excel.getProperty("WorkBooks".toDispatch();}/**LaunchExcelfilewiththismethod,*itcanbeinvokedmanytimes*/publicvoidlaunch(StringfileName){//nowmakeitappearexcel.setProperty("Visible",newVariant(true));//opentheexcelfileworkbook=Dispatch.callN(workbooks,"Open",newObject[]{fileName});}/**Releasetheresourcesandkilltheexcelprocess*/publicvoidrelease(){//quittheexcelapplicationexcel.invoke("Quit",newVariant[]{});//invokethemethodtocountdownthenumbersofthereference,//andreleasethemonebyonetokilltheexcelprocessfinally.ComThread.Release();}publicstaticvoidmain(String[]args){JacobExcelLauncherlauncher=newJacobExcelLauncher();launcher.launch("c:/workbook.xls";launcher.launch("c:/workbook2.xls";launcher.release();}} tomcat6.0启动问题 java学习 的 好网站、社区、博客、微博 Hibernate的小问题~ 求一正则表达式 tomcat定义了连接池,还需要自己写管理连接池的东西吗?? 哪个朋友用appfuse做过项目????? JTable中单元格组件的显示问题(顶者有分 ) 高分求教tomcat宕机问题,在线等,解决立马给分 请问远程客户怎么访问ejb(服务器是weblogic7) xml文件! 关于jsp的forward和request.getRequestURL()的疑惑,请达人来解决一下 XML实现查找的功能,简单的问题,解决即结!!!
packagecom.livedoor.finance.credit.admin.business.event.util;importcom.jacob.com.Variant;
importcom.jacob.com.Dispatch;
importcom.jacob.com.ComThread;
importcom.jacob.activeX.ActiveXComponent;/**
*@authorDarren.Wang
* 2005/03/17
*ThankstoSamir(whoisinAustralia),withouthishelp,Ican'tcompletethiswork.
*/
publicclassJacobExcelLauncher{
//excelautomation
privateActiveXComponentexcel;
//excelworkbooks
privateDispatchworkbooks;
//excelfilevarient
privateVariantworkbook;/*
*constructoroftheJacobExcelLauncher
*@authorDarren.Wang
*/
publicJacobExcelLauncher()
{
//starttheExcel
excel=newActiveXComponent("Excel.Application";
//firsttime,weneedsettheexceltobeinvisible
excel.setProperty("Visible",newVariant(false));
//getworkbooks
workbooks=excel.getProperty("WorkBooks".toDispatch();
}/*
*LaunchExcelfilewiththismethod,
*itcanbeinvokedmanytimes
*/
publicvoidlaunch(StringfileName)
{
//nowmakeitappear
excel.setProperty("Visible",newVariant(true));
//opentheexcelfile
workbook=Dispatch.callN(workbooks,"Open",newObject[]{fileName});
}/*
*Releasetheresourcesandkilltheexcelprocess
*/
publicvoidrelease()
{
//quittheexcelapplication
excel.invoke("Quit",newVariant[]{});
//invokethemethodtocountdownthenumbersofthereference,
//andreleasethemonebyonetokilltheexcelprocessfinally.
ComThread.Release();
}publicstaticvoidmain(String[]args){
JacobExcelLauncherlauncher=newJacobExcelLauncher();
launcher.launch("c:/workbook.xls";
launcher.launch("c:/workbook2.xls";
launcher.release();
}
}