jacob操作 office 内部对应代码

Excel操作  转换 

 

 

xlAddIn                                 18 Microsoft Office Excel 加载项 
xlAddIn8                                18 Excel 2007 加载项 
xlCSV                                    6 CSV 
xlCSVMac                                22 Macintosh CSV  
xlCSVMSDOS                              24 MSDOS CSV 
xlCSVWindows                            23 Windows CSV  
xlCurrentPlatformText                -4158 当前平台文本 
xlDBF2                                   7 DBF2 
xlDBF3                                   8 DBF3 
xlDBF4                                  11 DBF4 
xlDIF                                    9 DIF 
xlExcel12                               50 Excel 12 
xlExcel2                                16 Excel 2 
xlExcel2FarEast                         27 Excel2 FarEast 
xlExcel3                                29 Excel3 
xlExcel4                                33 Excel4 
xlExcel4Workbook                        35 Excel4 工作簿 
xlExcel5                                39 Excel5 
xlExcel7                                39 Excel7 
xlExcel8                                56 Excel8 
xlExcel9795                             43 Excel9795 
xlHtml                                  44 HTML 格式 
xlIntlAddIn                             26 国际加载项 
xlIntlMacro                             25 国际宏 
xlOpenXMLAddIn                          55 打开 XML 加载项 
xlOpenXMLTemplate                       54 打开 XML 模板 
xlOpenXMLTemplateMacroEnabled           53 打开启用的 XML 模板宏 
xlOpenXMLWorkbook                       51 打开 XML 工作簿 
xlOpenXMLWorkbookMacroEnabled           52 打开启用的 XML 工作簿宏 
xlSYLK                                   2 SYLK 
xlTemplate                              17 模板 
xlTemplate8                             17 模板 8 
xlTextMac                               19 Macintosh 文本 
xlTextMSDOS                             21 MSDOS 文本 
xlTextPrinter                           36 打印机文本 
xlTextWindows                           20 Windows 文本 
xlUnicodeText                           42 Unicode 文本 
xlWebArchive                            45 Web 档案 
xlWJ2WD1                                14 WJ2WD1 
xlWJ3                                   40 WJ3 
xlWJ3FJ3                                41 WJ3FJ3 
xlWK1                                    5 WK1 
xlWK1ALL                                31 WK1ALL 
xlWK1FMT                                30 WK1FMT 
xlWK3                                   15 WK3 
xlWK3FM3                                32 WK3FM3 
xlWK4                                   38 WK4 
xlWKS                                    4 工作表 
xlWorkbookDefault                       51 默认工作簿 
xlWorkbookNormal                     -4143 常规工作簿 
xlWorks2FarEast                         28 Works2 FarEast 
xlWQ1                                   34 WQ1 
xlXMLSpreadsheet                        46 XML 电子表格 

 

 

word 操作 转换   

 

 

//0:Microsoft Word 97 - 2003 文档 (.doc)
//1:Microsoft Word 97 - 2003 模板 (.dot)
//2:文本文档 (.txt)
//3:文本文档 (.txt)
//4:文本文档 (.txt)
//5:文本文档 (.txt)
//6:RTF 格式 (.rtf)
//7:文本文档 (.txt)
//8:HTML 文档 (.htm)(带文件夹)
//9:MHTML 文档 (.mht)(单文件)
//10:MHTML 文档 (.mht)(单文件)
//11:XML 文档 (.xml)
//12:Microsoft Word 文档 (.docx)
//13:Microsoft Word 启用宏的文档 (.docm)
//14:Microsoft Word 模板 (.dotx)
//15:Microsoft Word 启用宏的模板 (.dotm)
//16:Microsoft Word 文档 (.docx)
//17:PDF 文件 (.pdf)
//18:XPS 文档 (.xps)
//19:XML 文档 (.xml)
//20:XML 文档 (.xml)
//21:XML 文档 (.xml)
//22:XML 文档 (.xml)
//23:OpenDocument 文本 (.odt)
//24:WTF 文件 (.wtf)

 

 

 

 

 

 

Dispatch.invoke(doc, "SaveAs", Dispatch.Method, new Object[]{outFile, new Variant(destinationFilesType)}, new int[1]);
posted @ 2018-05-16 17:50  不断努力的青春  阅读(1156)  评论(0编辑  收藏  举报