Office文件转换器(ofc.exe)超时

时间:2013-04-30 22:01:08

标签: ms-office office-2007 ofc

我们遇到OFC成功转换excel文件的问题。我们已经调整了 ofc.ini文件更改以下内容:

LogDestinationPath=C:\src\tools

要转换为的文件夹:

fldr=C:\src\Tools\temp

有趣的是,这种转换在我们的两台开发机器上运行良好,但在第三台或服务器上运行良好。以下是服务器上命令提示符的输出(以管理员身份运行)。

C:\temp\Tools>ofc.exe
Microsoft Office File Converter version 12.0.4518.1032
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

Automatically converts Office documents to 2007 Microsoft Office system file for
mat based on settings in the OFC.INI control file.

Converting files from folder C:\temp\Tools\excel
Converting: C:\temp\Tools\excel\TestReport.xls Writing converted file to: C:\tem
p\Tools\Converted\excel\TestReport.xlsx
Error: C:\temp\Tools\excel\TestReport.xls failed to convert
Start:  2013-04-30 16:54:52
End:    2013-04-30 16:55:06
Total time used to convert files (sec): 14
Total number of files processed: 1
Total number of files converted: 0
Conversion Complete.

为什么会间歇性地失败?

1 个答案:

答案 0 :(得分:0)

增加timeout选项 - 可能是您的服务器少于资源 - 显然文件更大,您需要增加timeout - ofc.ini

[Run]
LogDestinationPath=C:\src\tools

TimeOut = 10000

[ConversionOptions]