Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

C# To Create Edit Excel Documents

$
0
0

Hello

I'm wanting to use C# to read write into a excel spredsheet.  Most of the sample I've gotten from the net have me add a COM object reference which I do.

They also create an xlApp = new Excel.ApplicationClass();   but when I do that, the compiler MSVS 2010 gives an error

Error 1 Interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded. Use the applicable interface instead. \\ccanet\home\jrschare\my

Error 1 The type 'Microsoft.Office.Interop.Excel.ApplicationClass' has no constructors defined \\ccanet\home\jrschare\my documents\visual studio 2010\Projects\excelTest1\excelTest1\Program.cs 20 21 excelTest1documents\visual studio 2010\Projects\excelTest1\excelTest1\Program.cs 20 31 excelTest1

Is there are better way to be doing this?


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>