System.Runtime.InteropServices.COMException (0x800A03EC): 无法访问文件
2018-09-05 15:22
435 查看
使用Microsoft.Office.Interop.Excel 操作
今天在服务器部署,操作程序csv文件转xsl文件的时候,遇到一下问题:
System.Runtime.InteropServices.COMException (0x800A03EC): 无法访问文件。请尝试下列方法之一:
• 确认所指定的文件夹已存在。
• 确认文件所在的文件夹不是只读的。
• 确认给出的文件名不包含下列字符: < > ? [ ] : | 或 * 。
• 确认文件/路径名长度不超过 218 个字符。
在 Microsoft.Office.Interop.Excel._Workbook.SaveAs(Object Filename, Object FileFormat, Object Password, Object WriteResPassword, Object ReadOnlyRecommended, Object CreateBackup, XlSaveAsAccessMode AccessMode, Object ConflictResolution, Object AddToMru, Object TextCodepage, Object TextVisualLayout, Object Local)
1、已经安装office2013 【问题依旧存在】
2、文件权限已经开启最大,【问题依旧存在】
3、 (组件服务)修改【问题依旧存在】
4、对比与服务器的环境本地多了一个 wps,装一个wps。【问题解决】,【这里不是打广告】
相关文章推荐
- System.Runtime.InteropServices.COMException (0x80004005): 无法创建目录或文件
- “System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务”解决方法
- System.Runtime.InteropServices.COMException: 拒绝访问.
- windows server 2008 x6 System.Runtime.InteropServices.COMException (0x800A03EC)處理方法
- System.Runtime.InteropServices.COMException (0x800A03EC)
- System.Runtime.InteropServices.COMException (0x8004E00F): COM+ 无法与 Microsoft 分布式事务协调程序交谈 (异常来自 HRESU
- c#程序在部分电脑运行异常解决方法(System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务)
- System.Runtime.InteropServices.COMException (0x8004E00F): COM+ 无法与 Microsoft 分布式事务协调程序交谈 (异常来自 HRESU
- System.Runtime.InteropServices.COMException: 拒绝访问.
- “System.Runtime.InteropServices.COMException”/ 其他信息: ClassFactory 无法供应请求的类 (异常来自 HRESULT:0x80040111
- Visual Studio 2008 System.Runtime.InteropServices.COMException
- System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况。 (异常来自 HRESULT:0x80010105 (RPC_E
- System.Runtime.InteropServices.COMException的解决方法
- System.Runtime.InteropServices.COMException: 内存不足,请现在保存文档。 IIS 7
- System.Runtime.InteropServices.COMException
- 文档管理系统 之一 doc、xls、ppt文档转换成html及System.Runtime.InteropServices.COMException (0x80004005): 360的问题
- vs2012 异常【System.Runtime.InteropServices.COMException (0x8000FFFF): 灾难性故障 】
- VS 2008 打开 WebApplication 报 System.Runtime.InteropServices.COMException 错误
- System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472
- VS 2008 打开 WebApplication 报 System.Runtime.InteropServices.COMException 错误