EDN Admin
Well-known member
Happy New Year to all our readers!
Hi everyone,
I have a need to write data to an Excel file.
I found a KB file, 306023, which gives a lot of information and an example that works.
I now want to add some of this code to a DLL that I am building. However, having added all the recommended References, I still get errors. Typically, <font size=2>
</font><font color="#0000ff" size=2>public</font><font size=2> </font><font color="#008080" size=2>Excel</font><font size=2>.Application m_objExcel = </font><font color="#0000ff" size=2>null</font><font size=2>;</font>
<font size=2>gives an error:</font>
<font size=2> 1 The type name Application does not exist in the type AnnsonDll.Excel .</font>
<font size=2>I dont understand why I get the error here, but not in the example code.</font>
<font size=2>I have searched the web, but I can find no useful information on any of this. </font>
<font size=2>The KB file refers to </font><font size=3>using Excel = Microsoft.Office.Interop.Excel; </font><font face="Geneva, Arial, Sans-serif" size=2>but this isnt recognised by my version of C#. </font>
<font face="Geneva, Arial, Sans-serif" size=2>The nearest I can get is <font size=4>using Excel = Microsoft.Office.Core;</font></font>
<font face="Geneva, Arial, Sans-serif" size=2>I am using Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727</font>
<font face="Geneva, Arial, Sans-serif" size=2>Installed Edition: Standard</font>
<font face="Geneva, Arial, Sans-serif" size=2>Microsoft Visual C# 2005 77633-233-0110651-41645
Microsoft Visual C# 2005</font>
<font size=2>Does nayone out there have any idea what I am missing? Any help will be really welcome!</font>
<font size=2></font>
<font size=2>Thanks for your time</font>
<font size=2>John</font>
View the full article
Hi everyone,
I have a need to write data to an Excel file.
I found a KB file, 306023, which gives a lot of information and an example that works.
I now want to add some of this code to a DLL that I am building. However, having added all the recommended References, I still get errors. Typically, <font size=2>
</font><font color="#0000ff" size=2>public</font><font size=2> </font><font color="#008080" size=2>Excel</font><font size=2>.Application m_objExcel = </font><font color="#0000ff" size=2>null</font><font size=2>;</font>
<font size=2>gives an error:</font>
<font size=2> 1 The type name Application does not exist in the type AnnsonDll.Excel .</font>
<font size=2>I dont understand why I get the error here, but not in the example code.</font>
<font size=2>I have searched the web, but I can find no useful information on any of this. </font>
<font size=2>The KB file refers to </font><font size=3>using Excel = Microsoft.Office.Interop.Excel; </font><font face="Geneva, Arial, Sans-serif" size=2>but this isnt recognised by my version of C#. </font>
<font face="Geneva, Arial, Sans-serif" size=2>The nearest I can get is <font size=4>using Excel = Microsoft.Office.Core;</font></font>
<font face="Geneva, Arial, Sans-serif" size=2>I am using Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727</font>
<font face="Geneva, Arial, Sans-serif" size=2>Installed Edition: Standard</font>
<font face="Geneva, Arial, Sans-serif" size=2>Microsoft Visual C# 2005 77633-233-0110651-41645
Microsoft Visual C# 2005</font>
<font size=2>Does nayone out there have any idea what I am missing? Any help will be really welcome!</font>
<font size=2></font>
<font size=2>Thanks for your time</font>
<font size=2>John</font>
View the full article