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 ...
随机推荐
- CodeForces 464E The Classic Problem | 呆克斯歘 主席树维护高精度
题意描述 有一个\(n\)点\(m\)边的无向图,第\(i\)条边的边权是\(2^{a_i}\).求点\(s\)到点\(t\)的最短路长度(对\(10^9 + 7\)取模). 题解 思路很简单--用主 ...
- A1038. Recover the Smallest Number
Given a collection of number segments, you are supposed to recover the smallest number from them. Fo ...
- 二分查找、two points、排序
二分查找 1.查找某元素.循环条件 low <= high,最终结果位mid, 如果查询失败则返回-1. int binSearch(int num[], int low, int high, ...
- 【SPOJ283】Naptime
题目大意:给定一个由 N 个点组成的环,点有点权,现从中选出 M 个点,对于顺时针方向来说,每一段被选取的第一个点的点权不计入答案贡献,求选出的最大权值是多少. 题解:首先考虑线性的情况,设 \(dp ...
- Eclipse集成Gradle 【Eclipse在线安装Gradle插件方法】
本章将介绍了Eclipse集成Gradle.以下是将Gradle插件添加到Eclipse的步骤. 步骤1 - 打开Eclipse Marketplace 打开在系统中安装好的Eclipse. 转到 J ...
- 发送邮件时Unable to relay错误的解决方法 转
使用python的smtplib发送邮件,使用新浪的smtp服务,在本地测试正常.但把程序部署到服务器后,却连不上新浪的smtp服务器,可以ping通,但telnet 25端口失败,导致程序无法正常运 ...
- 函数和常用模块【day04】:内置函数(十)
一.36-40 36.isinstance(object, classinfo) 功能:用于判断,对象是否是某个类的实例 # s = "alex" # 对象,"alex& ...
- EXISTS 与 NOT EXISTS 的用法及返回结果
(1)SELECT * FROM `datatower-all`.TMP_DWD_POI t1 WHERE EXISTS ( SELECT 1 FROM `datatower-all`.DWD_POI ...
- RocketMQ在windows环境下的安装
原博地址:https://www.jianshu.com/p/4a275e779afa 一.预备环境 1.系统 Windows 2. 环境 JDK1.8.Maven.Git 二. RocketMQ部署 ...
- JSTL中forEach标签应用示例【转】【补】
forEach样例 <%@ page language="java" import="java.util.*" pageEncoding="ut ...