Microsoft.Office.Interop.Excel.ChartObject.Copy上的未指定错误(来自HRESULT的异常:0x80004005(E_FAIL)) [英] Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) on Microsoft.Office.Interop.Excel.ChartObject.Copy
问题描述
我正在使用Microsoft.Office.Interop.Excel,以使用Asp.net将Excel图表复制到Powerpoint中。
它在可视stdio IDE中工作正常,但是当我将其部署在服务器上时。
会给出错误,
未指定错误(HRESULT的异常:0x80004005(E_FAIL))
i am working with Microsoft.Office.Interop.Excel, to copy excel chart into power point using Asp.net. It works fine in visual stdio IDE but as i I deploy it on server. it gives an error , Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
此错误由复制charobject时由代码生成
this erorr generted by code when it copies the charobject ,Only data copies perfectly fine.
问题是带有chartobject.copy()函数的。
我在Google上搜索了很多,但没有给出
,请帮助我。
problem is with chartobject.copy() function. I googled alot but it gives nothing please help me.
Moazzam
推荐答案
服务器中MS不支持Office互操作端方案(例如ASP.NET或Windows Service)-请参见 http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
Office interop is NOT supported by MS in server-side scenarios (like ASP.NET or Windows Service) - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
用于服务器端处理的Excel文件中,您将需要使用一些第三方库-有一些免费的商业库:
For server-side handling of Excel files you will need to use some 3rd-party library - there are several free and commercial libraries available:
- MS提供了OpenXML SDK V 2.0 (免费)
- http://www.codeproject.com/KB/office/ OpenXML.aspx (免费)
- ClosedXML (免费) )
- EPPlus (免费)
- Aspose.Cells (商业)
- SpreadsheetGear (商业)
- LibXL (商业)
- Flexcel (商业)
- MS provides the OpenXML SDK V 2.0 (free)
- http://www.codeproject.com/KB/office/OpenXML.aspx (free)
- ClosedXML (free)
- EPPlus (free)
- Aspose.Cells (commercial)
- SpreadsheetGear (commercial)
- LibXL (commercial)
- Flexcel (commercial)
这篇关于Microsoft.Office.Interop.Excel.ChartObject.Copy上的未指定错误(来自HRESULT的异常:0x80004005(E_FAIL))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!