09-15-2025 11:40 AM
Hi people,
I have developed a stand-alone application which using the activeX opens an excel template file (*.xlt) fills it with some data and then saves alternatively an Excel file (*.xlsx) or directly a PDF file (*.pdf). In the development machine is installed Excel 2016 32-bit, running it in a machine with the same Excel version everything works properly.
Now am trying to run it in a machine in which is installed Excel 365 MSO (Version 2508 Build 16.0.19127.20192) 32 bit, the part of the application which saves the file fails if the format chosen is Excel (*.xlsx), everything works if the format chosen is PDF (*.pdf), despite I use the same reference for the activeX, the workbook, the worksheet and so on, the only difference is the "ExportAsFixedFormat" method for PDF instead of "SaveAs" method for XLSX. Also the saving location is the same.
I think the "SaveAs" method is present in both version of activeX.
Does anyone knows a workaround? I would like to avoid to modify the application.
Solved! Go to Solution.
09-15-2025 01:25 PM
What can you tell us about the version of LabVIEW you are using? What year, patch/Q level, 32-or-64 bit, and "flavor" (Base, Full, Professional, Academic, Community)? [I gave up Active X more than a decade ago when I discovered the Report Generation Toolkit ...].
Bob Schor
09-15-2025 09:14 PM
Check Report Generation Toolkit and Microsoft Office and LabVIEW Compatibility
By any chance, are you also trying to run the EXE on a different Windows? From Running Executables or Installers on Different Windows Versions
Installers and executables are only guaranteed to work on the operating system they are built on. For example, a Windows 10 installer or executable may not work as expected on a different Windows version (e.g. Windows XP, Windows 8, or Windows 7).
09-16-2025 12:46 AM
Hi ICO,
@ICO_82 wrote:
the only difference is the "ExportAsFixedFormat" method for PDF instead of "SaveAs" method for XLSX.
Does anyone knows a workaround? I would like to avoid to modify the application.
Microsoft is known to change the properties of the SaveAs method with each Office version: unfortunately you need to provide LabVIEW code suitable for each Office version!
(Your question comes up frequently, so please search the forum more intensively! I remember for a very similar thread with RolfK involved in answering basically same question…)
So the generic answer is: you need to modify your application.
09-16-2025 03:04 AM
Labview 2015 SP1 32 bit, I think the problem is excatly in the differences between the activeX of the two office versions.
09-16-2025 03:04 AM
I am not using the report generator toolkit
09-16-2025 03:55 AM
Hi ICO,
@ICO_82 wrote:
I am not using the report generator toolkit
RGT also uses ActiveX under the hood, so you would end up with the same problem…
09-16-2025 04:53 AM
Hi GerdW, believe me I have searched for log time how to manage ActiveX for different versions but what I find is just install the office version in the developing machine. I would like to understand if it is possible to "adjust" office in order to be compatible.
09-16-2025 05:20 AM - edited 09-16-2025 05:35 AM
I have a similar problem. Developed executable with LV2021 for Windows 10 and Excel 2016. If I recreate the same executable using LV2021 on Windows 11 and Excel 365 it will fail on the PC using Excel 2016 when it goes to save the Excel file. It's because the Save As ActiveX for each version is slightly different. I think the solution if you want to still use ActiveX is to create the executable using the same Excel version that the executable will be deployed to.
Edit: also the both 2016 version and 365 version are 64 bit.
09-16-2025 05:46 AM