Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel.EXE中来自Windows服务的Excel互操作崩溃,版本:16.0.4966.1000,模块:oart.dll,版本:16.0.4900.1000_Excel_Windows_Service_Automation_Interop - Fatal编程技术网

Excel.EXE中来自Windows服务的Excel互操作崩溃,版本:16.0.4966.1000,模块:oart.dll,版本:16.0.4900.1000

Excel.EXE中来自Windows服务的Excel互操作崩溃,版本:16.0.4966.1000,模块:oart.dll,版本:16.0.4900.1000,excel,windows,service,automation,interop,Excel,Windows,Service,Automation,Interop,请不要评论,Windows服务不支持互操作模式,我知道。:-) 我有一个Excel文件,里面有表格和图表。它在Windows Server 2012R2下以Excel 2003作为Windows服务在互操作模式下运行了几年,没有任何问题 更改为Windows Server 2019和Excel 2016后,无法再使用以下代码打开此文件: Application excelApp = new Application(); Workbooks workBooks = excelApp.Workbo

请不要评论,Windows服务不支持互操作模式,我知道。:-)

我有一个Excel文件,里面有表格和图表。它在Windows Server 2012R2下以Excel 2003作为Windows服务在互操作模式下运行了几年,没有任何问题

更改为Windows Server 2019和Excel 2016后,无法再使用以下代码打开此文件:

Application excelApp = new Application();
Workbooks  workBooks = excelApp.Workbooks;
workBook = workBooks.Open(<Path To Excel-File>, 0, false, 5,
     Missing.Value, Missing.Value, true, XlPlatform.xlWindows, "\t", true, false, 0, true);
事件日志显示:

Name der fehlerhaften Anwendung: EXCEL.EXE, Version: 16.0.4966.1000, Zeitstempel: 0x5e205905
Name des fehlerhaften Moduls: oart.dll, Version: 16.0.4900.1000, Zeitstempel: 0x5d53033a
Ausnahmecode: 0xc0000005
Fehleroffset: 0x0006e67e
ID des fehlerhaften Prozesses: 0x1a38
Startzeit der fehlerhaften Anwendung: 0x01d5e64d380ea691
Pfad der fehlerhaften Anwendung: C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE
Pfad des fehlerhaften Moduls: C:\Program Files (x86)\Microsoft Office\Office16\oart.dll
Berichtskennung: b6eee871-9dca-4ddc-8d4b-cdd9f58f871b

在用我的文件进行了几个小时的测试之后,我创建了一个新的Excel文件,打开它并将数据读写到单元格中并没有问题。之后,我从文件中删除了越来越多的表和图表,最后我找到了崩溃原因:

任何图表或表格中是否有嵌入的图像,但无法通过Windows服务的互操作打开该文件。

使用命令行应用程序以相同的代码打开文件(带有内部图像)一点问题都没有。


但是可以在页眉或页脚中放置图像。没问题。疯狂。

奇怪的问题。因此,您知道答案(不支持),但选择忽略它。
Name der fehlerhaften Anwendung: EXCEL.EXE, Version: 16.0.4966.1000, Zeitstempel: 0x5e205905
Name des fehlerhaften Moduls: oart.dll, Version: 16.0.4900.1000, Zeitstempel: 0x5d53033a
Ausnahmecode: 0xc0000005
Fehleroffset: 0x0006e67e
ID des fehlerhaften Prozesses: 0x1a38
Startzeit der fehlerhaften Anwendung: 0x01d5e64d380ea691
Pfad der fehlerhaften Anwendung: C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE
Pfad des fehlerhaften Moduls: C:\Program Files (x86)\Microsoft Office\Office16\oart.dll
Berichtskennung: b6eee871-9dca-4ddc-8d4b-cdd9f58f871b