开发者

Resources for excel in Visual studio

开发者 https://www.devze.com 2023-01-11 12:55 出处:网络
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 wit

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 n开发者_开发问答eed 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?


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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消