从Excel文件读取数据 [英] Read data from an Excel file

查看:71
本文介绍了从Excel文件读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了官方文档,但重点是创建Excel文件而不是阅读。任何代码片段都将对我有所帮助!



如何读取Excel数据?

  COMPANY |文件| 
COMPANYONE | 123455986 |
COMPANYTWO | 123455986 |
公司三| 123455986 |


解决方案

我前一段时间也遇到过同样的问题。 / p>

我使用此解决方案从ASP.NET中的Excel文件(.xls)读取数据: http://www.dotnetcurry.com/ShowArticle.aspx?ID=138



只需通过SQL读取范围并将其发布到网页上的GridView中即可。



在我看来对于没有经验的ASP.NET/C#开发人员来说更容易理解。


I searched the official documentation, but it is focused on creating the Excel file and not on reading. Any code snippet as an example will help me!

How do I read Excel data?

COMPANY     | DOCUMENT  | 
COMPANYONE  | 123455986 | 
COMPANYTWO  | 123455986 |
COMPANYTHREE| 123455986 |

解决方案

I have had the same issue a while ago.

I used this solution to Read Data From an Excel File (.xls) in ASP.NET: http://www.dotnetcurry.com/ShowArticle.aspx?ID=138 .

Simply read the range via SQL and post it into a GridView on the webpage.

It looked to me simpler to understand for a not experienced ASP.NET/C# developer.

这篇关于从Excel文件读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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