System.Runtime.InteropServices.COMException (0x800A03EC): 无法访问文件
使用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 (0x800A03EC): 无法访问文件的更多相关文章
- 解决window 12 service 不能调用excel ,报"System.Runtime.InteropServices.COMException (0x800A03EC)
Step1: 运行comexp.msc -32 注意因为excel 是32 位的,所以这里用的32位的操作, 如用64位的操作命令:dcomcnfg.exe,将找不到excel com 进入compo ...
- VS2008,System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
在VS2008环境中编译调试运行不报错,但在发布的exe文件运行就报错 System.Runtime.InteropServices.COMException (0x800401F3): Invali ...
- excel System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况。 (异常来自 HRESULT:0x80010105 (RPC_E
System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况. (异常来自 HRESULT:0x80010105 (RPC_E ...
- “System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务”解决方法
应用程序中发生了无法处理的异常.如果单击“退出”,应用程序将立即关闭.无法启动服务,原因可能是已被禁用或其相关联设备没有启动.(异常来自HRESULT:0X80070422).点击详细内容:有关调用实 ...
- System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472
更新至服务器后运行出错: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472 解决方法 注册 ...
- System.Runtime.InteropServices.COMException (0x800706BA) 解决方法
提示“操作失败:无法获取MAC地址.”错误的解决方法. .NET 获取 MAC地址可能会遇到 System.Runtime.InteropServices.COMException (0x8007 ...
- Visual Studio 2008 – ASP.NET “System.Runtime.InteropServices.COMException”
The Issue When openning an existing ASP.NET project for the first time in Visual Studio 2008 it retu ...
- System.Runtime.InteropServices.COMException 检索COM类工厂中CLSID{xxxxxxxxx}的组件时失败解决方法
iis7.5中设定应用程序池中<进程模型>中<标识>为localSystem 提示:System.Runtime.InteropServices.COMException: 命 ...
- “System.Runtime.InteropServices.COMException”类型的第一次机会异常在 System.Windows.Forms.dll 中发生
最近做一个winform项目,在里面用了webbrowser控件进行html文档打印,遇到了标题所示问题.根据查到的一些资料,在调试>异常>查找中输入“System.Runtime.Int ...
随机推荐
- 【杂题1】USACO 2018 Open Contest-练习
https://www.xoj.red/contests/show/1231 下面会写一些题目的解析什么的,当然不会粘贴题目只是简单提一下 (部分题目简单的题目就不概括了) 其实难度应该前面比较低. ...
- XML解析(DOM、ElementTree)及转换为JSON
xml.dom篇 DOM是Document Object Model的简称,XML 文档的高级树型表示.该模型并非只针对 Python,而是一种普通XML 模型.Python 的 DOM 包是基于 S ...
- suoi08 一收一行破 (tarjanLca+树状数组)
用一个差分树状数组维护一下每个深度的和,然后每次拿着路径端点和lca加一加减一减就行了 #include<bits/stdc++.h> #define pa pair<int,int ...
- Android:更好的自定义字体方案
http://ryanhoo.github.io/blog/2014/05/05/android-better-way-to-apply-custom-font/ 情景 解决方案 1)Android默 ...
- JS循环语句!
<1> for(1.初始值(初始值只有一次):2.判断条件:4.状态改变){ 3.执行语句: //如果判断条件为true,则进入死循环:不设执行语句浏览器会未响应: } <2> ...
- JavaScript窗体Window.ShowModalDialog使用详解
Javascript有许多内建的方法来产生对话框,如:window.alert(), window.confirm(),window.prompt().等. 然而IE提供更多的方法支持对话框.如: s ...
- 上下文管理协议with_open,__enter__和__exit__(三十八)
在操作文件对象的时候可以这么写 with open('a.txt') as f: '代码块' 上述叫做上下文管理协议,即with语句,为了让一个对象兼容with语句,必须在这个对象的类中声明__ent ...
- 2018.7中石油个人赛第4场(D-Transit Tree Path)-最短路算法
6690: Transit Tree Path 时间限制: 1 Sec 内存限制: 128 MB提交: 472 解决: 132[提交] [状态] [讨论版] [命题人:admin] 题目描述 Yo ...
- 字节流转字符流OutputStreamWriter、InputStreamReader,关闭流的方法
转换时可以指定编码格式:GBK.UTF-8 public class Demo { public static void main(String[] args) { File f = new File ...
- linux tail -f messages查看控制台失败
[root@localhost log]# tail -f /var/log/messages ......................... tail: cannot watch `/var/l ...