3

我们遇到了 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.

关于为什么这会间歇性失败的任何想法?

4

1 回答 1

0

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

[Run]
LogDestinationPath=C:\src\tools

TimeOut = 10000

[ConversionOptions]
于 2014-12-14T14:57:28.260 回答