01-21-2020 11:25 AM - edited 01-21-2020 12:05 PM
Hello Everybody,
I am working on some code that is using .net calls to microsoft excel. It's awful stuff.
I want to use the report generation toolkit but don't have time to rewrite all the code.
Is it possible to cast an excel .net reference to the class type used in the report generation toolkit?
01-22-2020 03:58 AM
@SeanJ wrote:
Hello Everybody,
I am working on some code that is using .net calls to microsoft excel. It's awful stuff.
I want to use the report generation toolkit but don't have time to rewrite all the code.
Is it possible to cast an excel .net reference to the class type used in the report generation toolkit?
No. Sorry.
.NET and ActiveX references have nothing to do with each other...
You might get away with doing the .NET stuff, closing the document, opening it in the RGT, closing it again, repeat until done...
Best change of a decent solution would be to make a new child that inherits from the report generation, but implements the low level VIs with .NET. Than you can use the report generation VIs, combined with your own .NET code...
01-22-2020 05:25 AM
Thanks Wiebe,
I have been told that activex will be phased out by Microsoft Excel.
The only information I found was, "In 2015 Microsoft released Microsoft Edge, the replacement for Internet Explorer with no support for ActiveX, this marked the end of the technology in Microsoft's web browser development".
Do you know if there is a pipeline to port the report generation toolkit to .net? Do you know if activex support for excel cease soon?
Rgds,
Seán
01-22-2020 07:27 AM
Eventually, (I think) .NET will replace AX, but I don't think it AX will be abandoned anytime soon.
AFAIK, the .NET Office interface is just a wrapper around the ActiveX interface. So I don't know of a real .NET replacement for the AX interface.
The support of AX in IE refers to either using AX in IE or interfacing IE with AX. Either one doesn't mean AX won't be supported by Windows. And IIRC there is a .NET alternative for the AX browser...
My main problem with AX in the RGT is that there used to be early binding of the AX component. So, an executable build on one system required the exact same Excel\Word version, or the executable didn't work. Even a different language of the same Excel version rendered the executable useless. Not sure if it is still like that, but that would be a deal breaker for me.
The .NET wrapper solves this somewhat. IIRC, there are still two versions, with a version where you need to switch. I haven't used this myself, and I don't know and can't get the details right now.
I don't know of an update of the RGT. I wouldn't hold my breath...