Suggestions for reading data from excel in .net c#

2020-06-27 09:24发布

I need to read in data from excel files in my c# winforms app. Any recommendations on good components for this? I've used syncfusion some years ago and that seemed to do the trick.

There'll be a bunch of header lines I need to skip (so a straight ADO approach won't work easily) and then a table of data with standard columns but variable number of rows.

I'll be pumping the data into SQL Server db once it's read, but probably need to do validation etc on it before that.

thanks!

9条回答
何必那么认真
2楼-- · 2020-06-27 09:37

Using ASPOSE Tools

Using ADO.NET

Do you need graphic support?

查看更多
疯言疯语
3楼-- · 2020-06-27 09:42

you can use LINQ to XML also, see the link below...

Video Tutorial

查看更多
不美不萌又怎样
4楼-- · 2020-06-27 09:44

Im using the ComponentOne XLS component right now. It is pretty stable and does it job. Im using it for data integration too.

I also wanted to do some xls reports, however the API does not support the full excel stack (not even launching an excel instance) so i had to go over Mirosoft.Office.Interop

查看更多
混吃等死
5楼-- · 2020-06-27 09:44

Read this blog post on Reading and Writing Excel Spreadsheets.

Reading and Writing Excel Spreadsheets

查看更多
老娘就宠你
6楼-- · 2020-06-27 09:47
We Are One
7楼-- · 2020-06-27 09:51

SpreadsheetGear for .NET will do it.

You can see ASP.NET samples with C# and VB source here and download the free trial here if you want to try it out.

Disclaimer: I own SpreadsheetGear LLC

查看更多
登录 后发表回答