02-05-2024 09:25 AM
I've built a data collection project that calls up an Excel template and deposits the data in a table. It then saves the template under a different named worksheet. The data transfer to Excel works fine in the development environment but when I build an executable and run it, the new worksheet never shows up in the file location. Can anyone help me with this problem?
02-05-2024 09:28 AM
@SJE wrote:
Can anyone help me with this problem?
Not without seeing your code.
02-05-2024 09:35 AM
This is the program that I'm using to test the data deployment to Excel
02-05-2024 11:21 AM
One of two (or more) things is probably happening here...maybe more but you didn't post any code (only the project file) so it's difficult to say:
02-05-2024 11:23 AM - edited 02-05-2024 11:26 AM
@SJE wrote:
This is the program that I'm using to test the data deployment to Excel
Um... That zip only contains the LabVIEW Project descriptor (.lvproj) none of your VIs are there.
On top of what aputman said, most often when a program runs fine in the development environment but the EXE fails it's a file path issue or a race condition in your code.
02-05-2024 11:39 AM
I'm sending you the Excel template and the VI. I did install the MS Office Report from the "Excel Toolkit" I don't know what you mean by, "You'll have to "Always Include" them in the EXE settings. Filepaths not being generated properly. Use the "Application Directory" constant instead of the "Current VI Path" Could you explain to me the "Application Directory" option?
02-05-2024 01:44 PM
I'm stuck at LabVIEW 2018....can't open your file.
You can find the Application Directory constant in the File I/O palette. Did you look at the help file for it? This knowledge base article explains it a bit.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NFfSAM&l=en-US
Have you gone thru any tutorials for LabVIEW? Click the tutorials link and just above the forum topics, you'll find a group of links for learning LabVIEW. I would suggest looking thru those tutorials and learning some of the basics.
02-05-2024 01:52 PM - edited 02-05-2024 01:55 PM
@aputman wrote:
- Report generation toolkit VI's not being included in the build. The dependencies should be auto-included if you use any VI's from the Excel Specific palette. Otherwise you'll have to "Always Include" them in the EXE settings.
Due to the dynamic dispatch used for the Report Generation Toolkit, the plugins (Excel plugin, Word plugin) are not included. You will need to include the plugin(s) you need and another library. I'll have to dig to find which ones. I do not have access to the program I ran into this with. But I'm pretty sure there is a KB on it.
EDIT: I found the KB: Error 7 While Deploying LabVIEW Executable with Report Generation Toolkit
02-05-2024 02:20 PM
That’s the really bad part of this problem. I did see that KB about the include for Office Toolbox and I did include the NI_Excel Class file in my build yet I still can’t get data to display in Excel after the application is built. Works fine in development but not as an executable.
02-05-2024 02:21 PM
@crossrulz wrote:
Due to the dynamic dispatch used for the Report Generation Toolkit, the plugins (Excel plugin, Word plugin) are not included. You will need to include the plugin(s) you need and another library. I'll have to dig to find which ones. I do not have access to the program I ran into this with. But I'm pretty sure there is a KB on it.
EDIT: I found the KB: Error 7 While Deploying LabVIEW Executable with Report Generation Toolkit
Some of the VI's from Excel Specific palette will automatically include the plugin because it's statically linked in the code.