3
Reply

C#.NET excel automation question

golfingirishman

golfingirishman

Feb 13 2005 6:51 PM
1.8k
Hello all, never worked much with C#.NET before, and I have been following this example step by step: http://support.microsoft.com/default.aspx?scid=kb;EN-US;302084 I have also tried numerous other solutions found on the web. All I want to do is click a button on a c# windows form and have it spawn an excel spreadsheet (and eventually write data to it). I am running xp professional, and office 2000 premium, and coding with visual studio.net 2003. I follow the steps that page tells me to do precisely, however on step 3(b) where it says to add "Microsoft Excel Object Library" on the COM tab, I do not have that I have "Microsoft Excel 9.0 Object Library" safe to assume its the same thing? After doing everything else it says, I try running it and get: Namespace '' already contains a definition for 'Excel' I have looked around for days trying to figure out what exactly I am doing wrong and have found nothing to help me. Anyone have any ideas? I can post code if it helps, but as I said its EXACTLY what was listed on the link above. Any help is greatly appreciated. thanks, Dave

Answers (3)