hua liang

hua liang

  • NA
  • 1
  • 0

error0234 encountered when using microsoft office 12 object library

Jun 3 2009 2:38 PM
Hello, I am currently using Visual c# to write a program that can open a excel worksheet, extract data and put it into arrays and do calculations with the arrays. So I have to import the COM components Microsoft Office 12 object library and Microsoft Excel 12 object library, which I did. Then in my code I have added: using Microsoft.Office, Microsoft.Office.Interop.Excel, etc etc. So I had built my solution and started testing it in visual studio, and it is working properly. However when I try to compile this program in cmd I get a error. Here is what I had entered: csc /target:exe testProgram1.cs (where testProgram1.cs is my file name) however I got errors cs0234: The type or namespace name "office" does not exist in the namespace "microsoft" and here is my reference regarding microsoft.office: using Microsoft; using Microsoft.Office; using Excel = Microsoft.Office.Interop.Excel; using Microsoft.Office.Core; using Microsoft.Office.Interop.Excel; I was hoping if someone could help me with this? I 'm sure that office would be in microsoft?