Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Dear All
 
How i import data from excel 2010 to dotnet C#?
Posted 19-Sep-12 21:22pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

http://exceldatareader.codeplex.com
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

Have a look at Excel Data Reader - Read Excel files in .NET[^] and EPPlus[^]
 
The libraries lets you to import the data, even if Excel is not installed on the computer.
 
Best regards
Espen Harlinn
  Permalink  
Comments
digimanus at 24-Apr-14 8:23am
   
I like EPPLUS> very effective and performing component
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Google broken?
 
Interop ring any bells?
 
Here is a link to one short brief blog about it http://blogs.popart.com/2008/07/importing-data-from-excel-with-c/[^].
 
I am sure you will find many more better articles if you apply a bit of effort. You could have found these in the time it took you to ask such an open question.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

Just save it as csv
and import it as string[] lines =File.readAllLines("path.csv");
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 12

Here is a good way to read both csv and Excel.
https://toxy.codeplex.com/wikipage?title=Load%20Excel%20into%20DataSet%20with%20Toxy
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 13

You can try the below:
 
string path = fileuploadExcel.PostedFile.FileName;
           string excelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=Excel 12.0;Persist Security Info=False";
              InsertExceldata(excelConnectionString);
             
           }
 
In InsertExceldata method do what you desire with the imported data.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 26 May 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100