Hi
Does anybody have working .NET Interop code for this (old) COM Automation code:
XlNames := XlWorkBook.Names;
XlName := XlNames.Item('some-name');
XlRange := XlName.RefersToRange;
XlRange.Value := 'some value'
According to the documentation:
http://msdn.microsoft.com/en-us/library ... 92981.aspx
XLNames.Item has optional parameters, which I think is not supported in NAV 2013 .NET Interop.
However, I used the code above many times in the past... and I would like to get rid of COM Automation.
Regards
Comments
http://www.dynamics.is/?p=706
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com
Do you recommend to create a new addin - DLL (wrapper) which references DocumentFormat.OpenXml.dll and ClosedXML.dll
OR
use the two DLL's directly in NAV with .NET Interop (which I would prefer)?
Or the other way around: Are those two DLL's designed that way that they are usable with .net interop (No optional parameter, no method overloading, etc...)?
the DocumentFormat.OpenXML.dll is never used directly in NAV but needed along with ClosedXML.dll in the server add-ins folder.
You should be able to find code samples both on my website and also on Kauffmann’s blog http://www.kauffmann.nl/blog/index.php/2011/09/24/export-to-excel-on-rtc-using-net-interop/
You can also search for OpenXML on mibuso to find some examples.
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com