From my research I have found that the following two lines should be added to the Using declarations section:
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
The main problem seems to in adding a Reference to the Excel 12.0 object. As far as I can determine the reference should be C:\Program Files\Microsoft Office\Office12\EXCEL.EXE but the NinjaScript compiler chokes on that with an error. CS0009 - could not open.
Without a reference the compiler does not like
using Excel = Microsoft.Office.Interop.Excel;
get error CS0234 - 'Office' does not exist in the namaspace 'Microsoft;
just typing: using Microsoft. I get 3 options: CSharp, VisualBasic, and Win32. No Office.
Thanks.
Comment