LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel .net reference to report generation toolkit class

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?

0 Kudos
Message 1 of 4
(2,206 Views)

@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...

Message 2 of 4
(2,019 Views)

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

0 Kudos
Message 3 of 4
(2,009 Views)

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...

0 Kudos
Message 4 of 4
(1,956 Views)