My Excel Framework Methods

Download and share automation modules and examples.
User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

My Excel Framework Methods

Post by Ciege » Wed Apr 11, 2012 4:12 pm

A few people have asked for the code I use to interact with Excel so I have decided to post some of the methods here.

You will need to make a reference to Microsoft.Office.Interop.Excel for this code to compile properly.
You do not have the required permissions to view the files attached to this post.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

Pavlo
Posts: 43
Joined: Fri Dec 30, 2011 10:55 am

Re: My Excel Framework Methods

Post by Pavlo » Thu Apr 19, 2012 8:42 am

Hi Ciege
Which version of Excel are supported with your framework?

I had similar goal and re-used nice and free library called NPOI which provides great possibilities to read/write excel file (including such amazing features as formatting, comments for cells, hyperlinks, reading cashed formula results and so on and so on).

If you need something more then just read string data or write string data to excel file - I would recommend everybody to spend 5-10 minutes and check NPOI (first result from google search) library :)

-re
Pavlo

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: My Excel Framework Methods

Post by Ciege » Thu Apr 19, 2012 3:39 pm

I use V12, but the methods should work for most any modern version of Excel.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: My Excel Framework Methods

Post by atom » Thu Apr 26, 2012 7:47 pm

Hiya,

We used the NPOI library for excel interaction
http://npoi.codeplex.com/
It only support .XLS format - but has the added advantage that is doesnt need Excel installed on the PC

Clayton

roneil
Posts: 19
Joined: Wed Sep 07, 2011 3:59 pm

Re: My Excel Framework Methods

Post by roneil » Tue May 01, 2012 3:55 pm

Some of our developers have been experimenting with EP Plus. It's released under the LGPL and does not require MS Office on the system.

EP Plus: http://epplus.codeplex.com/

It only appears to create XLSX files (Excel 2007 formats), though. It requires .Net Framwork 3.5 or higher.

It's based upon the older ExcelPackage project (http://excelpackage.codeplex.com/).

Does anyone have any experience using either of these in comparison to NPOI?