MS Office是否需要将Excel数据绑定到gridview [英] Do MS Office required to Bind Excel data to gridview

查看:73
本文介绍了MS Office是否需要将Excel数据绑定到gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在尝试将Excel文档数据绑定到Gridview中。但在我的系统中,我没有MS办公室。这需要强制性吗?或者我可以在没有MS Office的情况下工作/绑定Excel文档。

请帮我解决这个问题。



问候

Rajus

Hi I am trying to bind Excel document data into Gridview. But in my system i dont have MS office. Do it required compulsory..?. Or i can work/Bind Excel Document Without MS Office.
Please help me on this issue.

Regards
Rajus

推荐答案

有各种库可让您在未安装Office的情况下在服务器上阅读和创建Excel电子表格。例如:

There are various libraries which let you read and create Excel spreadsheets on the server without having Office installed. For example:
  • EPPlus[^];
  • ClosedXML[^];
  • ExcelDataReader[^];
  • The OpenXML SDK[^];


它依赖于你用来读取excel文件的代码,如果您使用OLEDB对象读取excel文件,则无需安装EXCEL应用程序,否则如果您使用COM INTEOP对象读取EXCEL则必须安装。
Its depend upon a code you used to read excel file, If you have use OLEDB object to read excel file then there is no need to install EXCEL application otherwise if you have use COM INTEOP object to read EXCEL then installation is mandatory.


这篇关于MS Office是否需要将Excel数据绑定到gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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