‎06-11-2021 11:36 AM
Hey guys been using the report generation toolkit for years to write out simple reports and files. All of the sudden the report generation toolkit can't open Excel to start dumping data. Now all my tools don't work anymore. It actually gives error "Report Generation Toolkit: Microsoft Word or Excel did not open. Make sure Microsoft Word or Excel is installed.". I suspect some sort of update from IT as the culprit as it has happened in the past. Anyone knowledgeable enough to help/ know how to troubleshoot? Something as simple as this doesn't work.
Thanks
Randy
Solved! Go to Solution.
‎06-11-2021 12:06 PM
Could IT have uninstalled the ActiveX library? I believe there are developer tools (ActiveX) that can be skipped during an install.
What is the error number? Have you searched online for that particular error code?
Is Excel running in the background? Check the task manager for instances of Excel.
Have you checked compatibility between RGT, Office and LabVIEW?
Have you recently changed versions of Windows/Office/LabVIEW?
There may be some settings in the Excel Trust Center that are preventing interaction.
‎06-11-2021 12:17 PM
I don't think that the active X library is gone because Excel is still operating properly outside of this and I use it alot. The Error Code is -41106 which seems to be a pretty generic error. Lots of reports of folks having issues with deployments not so much running in Labview. IT pushed some security updates to Office 2016 which is what we have last week and trouble has been around since then. Everything worked flawlessly before that. Specifics on what to check in the trust center?
‎06-11-2021 02:12 PM
I assume this doesn't apply since you said a simple example also fails. But I'll leave it anyways.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000001DkaLCAS&l=en-US
Have you tried to repair the Office installation?
‎06-11-2021 03:46 PM - edited ‎06-11-2021 03:50 PM
@randy1815 wrote:
I don't think that the active X library is gone because Excel is still operating properly outside of this and I use it alot. The Error Code is -41106 which seems to be a pretty generic error. Lots of reports of folks having issues with deployments not so much running in Labview. IT pushed some security updates to Office 2016 which is what we have last week and trouble has been around since then. Everything worked flawlessly before that. Specifics on what to check in the trust center?
Actually that is what is exactly happening when installing the Office 365 version (or more exactly the "Click to Run" version of the Office installer. Office 2016 has such installers too and causes the same problems!). The whole Office installation got pretty messed up with the standalone version of Office being not the same as the "Click to Run" version. ActiveX is considered old and legacy by Microsoft nowadays and they are slowly preparing to get it removed from Windows products by default. You still should be able to install it with a custom install, but it won't be installed by default anymore. And when upgrading it will simply deinstall the old version without automatically replacing it with the new one.
Also there seems to be a problem that by default the ActiveX components only get registered for the bitness the whole Office package is in, despite that ActiveX would be perfectly able to marshal its calls across bitness borders through out of process marshalling, if it was only registered correctly for both Win64 and Wow6432. So if you install Office 64-bit you can't by default open it in LabVIEW 32-bit. I'm not sure what exactly needs to be done to make it work across bitness. I did search it out in the past for an ERP application we used company internal and it worked but had some strange effects. We since moved to the cloud version of that app, so the entire hack is obsolete.
‎06-11-2021 10:12 PM
Lots of reasons why Excel automation gets broken, no doubt, but this came up recently for me and others. Did you visit this thread ?
Hope this helps,
Dave
‎06-14-2021 08:08 AM
Thanks for all the help guys a repair got it going.
‎06-14-2021 08:41 AM
Recent office upgrade seems to have broken a lot of stuff... Our whole office got in and outbound emails quarantined (we use Outlook) and it's still an ongoing problem.
‎06-14-2021 09:05 AM
Occasionally an update to Office automation methods (adding a parameter to an ActiveX method) will break one or more Report Generation toolkit VIs. The answer for that is generally just to open the broken VI's BD, relink the method invocation node, and re-save the VI. This is a legitimate reason (one of a very few legitimate reasons, IMO) to modify a standard library VI.
But as I described in that other thread I linked to, recent Office 16 patches just seem to end up with a broken ActiveX interface - well below toolkit level, you just can't open a reference to Excel._Application without an error thrown. So far, the "Office Quick Repair" seems to speedily correct the problem.
But don't be surprised if the next Office patch does the same thing and your development environment (and even your executables using the RGT) once again are broken. (Keeping fingers crossed the Quick Repair will always work.)
Dave
‎06-15-2021 01:24 AM
TBH i try to avoid using RGT because i encountered so many issues with it. Recently i started using Carya PDF toolkit and i have to say i'm lovin it. Can't do excel reports tho, afaik.