views:

44

answers:

3

I have been tasked to rewrite an old excel workbook that is full of ugly vb macros. It is mostly some simple data entry, and some reporting functionality on top of that. I am not super experienced with Excel, but I can get around.

I know that visual studio has project types for excel, but I am not really sure what is possible. I am a c# developer, and would greatly prefer that to crappy vb macros.

Are there any resources for learning to write plugins and workbooks in c#? Google does not seem to be helping me very much. I really just need a few good examples and I should be good to go?

I generally can't find many good resources for excel in general either? Most are old or unhelpful. Any recommendations?

+2  A: 

I do a lot of spreadsheet manipulation in c# via the COM interface. You can find examples and more information from MS here.

If your spreadsheets are simple, you can also use ADO.Net interfaces (described here) but I never could figure out how this would work for non-simple worksheets.

KallDrexx
+1  A: 

Here is a Microsoft knowledge base article on using interop to automate Excel.

Laplace
A: 

I just stumbled across Excel-Dna yesterday, and it looks like a very promising way to use VB.NET/C# in a UDF/macro capacity within Excel. I haven't had a chance to try it yet, but it seems to be actively maintained and has an active mailing list.

technomalogical