Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Excel
Hi everybody!
 
Please advise me some easy-to-use library to work with Excel in .NET. What I need to do:
 
1. Create workbook with multiple sheets.
2. Fill it with data.
 
Don't want to use standard built-in COM library to write lousy code like:
 
Excel.Workbook wb = 
    ThisApplication.Workbooks.OpenText("C:\\Test.txt", 
    Type.Missing, 3, Excel.XlTextParsingType.xlDelimited, 
    Excel.XlTextQualifier.xlTextQualifierDoubleQuote, 
    Type.Missing, Type.Missing, Type.Missing, True, 
    Type.Missing, Type.Missing, Type.Missing, 
    Type.Missing, Type.Missing, Type.Missing, 
    Type.Missing, Type.Missing, Type.Missing);
 
LINQ to Excel just retreives data and allows to perform queries.
 
Thanks in advance.
Posted 28-Mar-11 7:53am
Comments
Mark Nischalke at 28-Mar-11 13:18pm
   
What version(s) of Excel are you supporting? The "lousy" COM code may be all you have.
Pavel Yermalovich at 28-Mar-11 13:37pm
   
It doesn't matter. I need generate at least some Excel version's file. I meant some wrapper for COM. I found different libraries but they generally suports queries but not creating.
digital man at 28-Mar-11 14:00pm
   
I think you need to search here and on Google and I'm pretty sure you'll find what you need.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,
 
i found this one very useful since it does not require to have Excel installed:
http://code.google.com/p/excellibrary/[^]
  Permalink  
Comments
Pavel Yermalovich at 28-Mar-11 15:13pm
   
This is what I'm looking for. Thanks.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Excel interop is one of the few places where I'd recommend VB.NET over C# purely because of VB.NET's ability to call method signatures with optional parameters. If you're more comfortable in C#, you can just create a class library in VB to wrap the functionality you want to use and import the library into your C# project.
 
That being said, there's also this: Excel Reader[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 400
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,032
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,220


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 22 Jan 2013
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