F.P
F.P

Reputation: 17831

Wrapper for Excel Interop that allows "good" programming

I'm fairly new to programming with Interop.Excel and may lack the experience, but why is it such a pain to program with it? Casting objects everywhere, more or less no documentation on the methods (at least not in the code) and every method seems to return objects, so there is no way of telling what it actually does. Also, all arguments are objects to begin with.

Is there any good wrapper library out there that provides basic functionality (writing to cells, reading, creating sheets, deleting sheets, basic formatting and layouting) and does this in a good, clean and understandable (and by that I mean: well-documented) way?

PS: Working with C# and .NET-3.5

Upvotes: 1

Views: 3200

Answers (4)

Manuel
Manuel

Reputation: 11469

Try ClosedXML, it wraps the OpenXML SDK to give a very intuitive way to create Excel files.

Upvotes: 1

Nick Martin
Nick Martin

Reputation: 282

If you're having problems with using interop directly, you may want to try out OfficeWriter. It can do anything you've described above with Excel, and more. You can request a free trial. There's a fully documented api available at the documentation site.

DISCLAIMER: I'm one of the engineers who built the latest version.

Upvotes: 1

Tim Jarvis
Tim Jarvis

Reputation: 18815

Well this is quite pricey, but in my opinion worth the money if you are doing serious commercial work with excel. As well as being the fastest option, you also don't even have to have excel installed, anyone who has run excel on a server will understand why that is huge.

Http://www.spreadsheetgear.com

Upvotes: 2

gdoron
gdoron

Reputation: 150253

I'm using EPPlus and very happy with it. It's open source and free.
The owners offer support when ever it was required.

EPPlus on codeplex

Note that EPPlus doesn't support Excel 2003 format. .xlxs is supported while. xls is not.

Upvotes: 2

Related Questions