Mar 17, 2012 at 11:14 PM

I get the following error when I try to convert my Office PIA project into NetOffice:

The type or namespace name 'XlPasteType' does not exist in the namespace 'NetOffice.ExcelApi'

I am using it here:

        public static void CopyAndPasteSpecialRange(Excel.Range src, Excel.Range dest, Excel.XlPasteType type)

How do I resolve this?

Mar 17, 2012 at 11:25 PM


which NetOffice release do you use?
the error comes out while compile or runtime?

for compile time, please note: NetOffice Enums are stored in a seperate namespace. in your case: NetOffice.ExcelApi.Enums.


Mar 18, 2012 at 12:18 AM

Thank you. That works. I was doing compile (I am using version 1.4). 

Is there an easy way to use InputBox to get userinput in your NetOffice?

Mar 18, 2012 at 11:05 AM

same as VBA or interop assemblies of course.

result = excelApplication.InputBox("please insert something.");