主机WCF使用excel On Asp.net主机站点 [英] Host WCF using excel On Asp.net hosting site

查看:66
本文介绍了主机WCF使用excel On Asp.net主机站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i have created a wcf service that uses excel file for doing some operation on it the problem is that when i host it on hosting site like somee or smarterasp it doesn't work as excel isn't installed on server how can i solve that?

推荐答案

阅读以下Microsoft知识库文章:

Read the following Microsoft knowledgebase article:



Microsoft目前不建议并且不支持从任何无人参与的非交互式客户端应用程序或组件(包括ASP,ASP)自动化Microsoft Office应用程序.NET,DCO M和NT服务),因为Office在此环境中运行时可能会出现不稳定的行为和/或死锁。


Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.



文章记录了各种如果你想从ASP.NET应用程序中使用Office互操作,你必须跳过这个环节 - 并且不能保证它会起作用,或者它不会在将来的某个随机点停止工作。



有多种方法可以在不使用Office互操作的情况下在服务器上读取,创建和操作Excel电子表格,这些方法都不需要在服务器上安装Office。例如:

  • EPPlus [ ^ ];
  • ClosedXML [ ^ ];
  • ExcelDataReader [ ^ ] ;
  • OpenXML SDK [ ^ ];

  • The article documents the various hoops you'll have to jump through if you want to use Office interop from an ASP.NET application - and there's no guarantee that it will work, or that it won't stop working at some random point in the future.

    There are various ways to read, create and manipulate Excel spreadsheets on the server without using Office interop, none of which require having Office installed on the server. For example:

    • EPPlus[^];
    • ClosedXML[^];
    • ExcelDataReader[^];
    • The OpenXML SDK[^];

    • 这篇关于主机WCF使用excel On Asp.net主机站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆