在WIN7下,如何建立dcom配置中的excel应用程序
来源:网络收集 点击: 时间:2024-08-09首先,在运行处输入dcomcnfg.exe,进入组件服务,查看当前DCOM配置中是否存在excel应用程序?如果不存在,接下来就要自己重建这个应用。

确定电脑中,目前安装的Office Excel安装在哪个盘哪个目录下,正确一般在C盘,本人电脑EXCEL文件所在位置为例C:\Program Files\Microsoft Office\Office12\EXCEL.EXE
3/6打开记事本,把下列注册表代码复制到记事本中。
Windows Registry Editor Version 5.00
@=Microsoft Office Excel 97-2003 工作表
IPersistStorageType=dword:00000002
@=Microsoft Office Excel 97-2003 工作表
AppID={00020820-0000-0000-C000-000000000046}
@=Worksheet
@=Microsoft Office Excel 2003
@=Biff8,ExcelWorksheet,ExcelML12,Biff12
@=Biff8,ExcelML12,Biff12
@=Biff8
@=3,1,32,1
@=2,1,16,1
@=1,1,1,1
@=NotesDocInfo,1,1,1
@=NoteshNote,-1,1,1
@=.xls, Excel Workbook (*.xls)
@=C:\\Windows\\Installer\\{90120000-0011-0000-0000-0000000FF1CE}\\xlicons.exe,1
@=16
@=ole32.dll
Assembly=Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C
Class=Microsoft.Office.Interop.Excel.WorksheetClass
RuntimeVersion=v1.1.4322
Assembly=Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C
Class=Microsoft.Office.Interop.Excel.WorksheetClass
RuntimeVersion=v1.1.4322
@=
@=C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
LocalServer=hex(7):76,00,55,00,70,00,41,00,56,00,35,00,21,00,21,00,21,00,21,\
00,21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,\
43,00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,\
00,24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,\
61,00,54,00,4f,00,35,00,00,00,00,00
@=C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
LocalServer32=hex(7):76,00,55,00,70,00,41,00,56,00,35,00,21,00,21,00,21,00,\
21,00,21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,\
00,43,00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,\
7e,00,24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,\
00,61,00,54,00,4f,00,35,00,00,00,00,00
@=32
@={98de59a0-d175-11cd-a7bd-00006b827d94}
@=Excel.Sheet.8
@={00020813-0000-0000-C000-000000000046}
@=编辑(E),0,2
@=打开(O),0,2
@=1.2
IPersistStorageType=dword:00000002
@=Microsoft Office Excel 97-2003 工作表
AppID={00020820-0000-0000-C000-000000000046}
@=Worksheet
@=Microsoft Office Excel 2003
@=Biff8,ExcelWorksheet,ExcelML12,Biff12
@=Biff8,ExcelML12,Biff12
@=Biff8
@=3,1,32,1
@=2,1,16,1
@=1,1,1,1
@=NotesDocInfo,1,1,1
@=NoteshNote,-1,1,1
@=.xls, Excel Workbook (*.xls)
@=C:\\Windows\\Installer\\{90120000-0011-0000-0000-0000000FF1CE}\\xlicons.exe,1
@=16
@=ole32.dll
Assembly=Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C
Class=Microsoft.Office.Interop.Excel.WorksheetClass
RuntimeVersion=v1.1.4322
Assembly=Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C
Class=Microsoft.Office.Interop.Excel.WorksheetClass
RuntimeVersion=v1.1.4322
@=
@=C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
LocalServer=hex(7):76,00,55,00,70,00,41,00,56,00,35,00,21,00,21,00,21,00,21,\
00,21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,\
43,00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,\
00,24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,\
61,00,54,00,4f,00,35,00,00,00,00,00
@=C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
LocalServer32=hex(7):76,00,55,00,70,00,41,00,56,00,35,00,21,00,21,00,21,00,\
21,00,21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,\
00,43,00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,\
7e,00,24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,\
00,61,00,54,00,4f,00,35,00,00,00,00,00
@=32
@={98de59a0-d175-11cd-a7bd-00006b827d94}
@=Excel.Sheet.8
@={00020813-0000-0000-C000-000000000046}
@=编辑(E),0,2
@=打开(O),0,2
@=1.2
@=Microsoft Office Excel 97-2003 工作表
IPersistStorageType=dword:00000002
@=Microsoft Office Excel 97-2003 工作表
AppID={00020820-0000-0000-C000-000000000046}
@=Worksheet
@=Microsoft Office Excel 2003
@=Biff8,ExcelWorksheet,ExcelML12,Biff12
@=Biff8,ExcelML12,Biff12
@=Biff8
@=3,1,32,1
@=2,1,16,1
@=1,1,1,1
@=NotesDocInfo,1,1,1
@=NoteshNote,-1,1,1
@=.xls, Excel Workbook (*.xls)
@=C:\\Windows\\Installer\\{90120000-0011-0000-0000-0000000FF1CE}\\xlicons.exe,1
@=16
@=ole32.dll
Assembly=Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C
Class=Microsoft.Office.Interop.Excel.WorksheetClass
RuntimeVersion=v1.1.4322
Assembly=Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C
Class=Microsoft.Office.Interop.Excel.WorksheetClass
RuntimeVersion=v1.1.4322
@=
@=C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
LocalServer=hex(7):76,00,55,00,70,00,41,00,56,00,35,00,21,00,21,00,21,00,21,\
00,21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,\
43,00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,\
00,24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,\
61,00,54,00,4f,00,35,00,00,00,00,00
@=C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
LocalServer32=hex(7):76,00,55,00,70,00,41,00,56,00,35,00,21,00,21,00,21,00,\
21,00,21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,\
00,43,00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,\
7e,00,24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,\
00,61,00,54,00,4f,00,35,00,00,00,00,00
@=32
@={98de59a0-d175-11cd-a7bd-00006b827d94}
@=Excel.Sheet.8
@={00020813-0000-0000-C000-000000000046}
@=编辑(E),0,2
@=打开(O),0,2
@=1.2
然后在记事本中,用替换把里面的EXCEL路径替换为你电脑对应的EXCEL所在路径,目前路径为C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE
如果一样就不用改动,直接另存为Excel应用.reg。注意文件扩展名为reg。
4/6双击执行Excel应用.reg,导入注册表信息。

完成导入。重启电脑。

运行dcomcnfg.exe,现在就可以查看到相应的EXCEL应用组件了。再打开软件进行EXCEL导出,就不再提示出错,OK了。


本注册表导入时需要检查原DCOM中有没有相应的EXCEL应用,如果有就不需要导入了。
版权声明:
1、本文系转载,版权归原作者所有,旨在传递信息,不代表看本站的观点和立场。
2、本站仅提供信息发布平台,不承担相关法律责任。
3、若侵犯您的版权或隐私,请联系本站管理员删除。
4、文章链接:http://www.1haoku.cn/art_1095067.html