LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to build an executable that includes an send data to excel

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? 

0 Kudos
Message 1 of 11
(664 Views)

@SJE wrote:

Can anyone help me with this problem? 


Not without seeing your code.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 11
(662 Views)

This is the program that I'm using to test the data deployment to Excel

0 Kudos
Message 3 of 11
(656 Views)

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:

  1. 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. 
  2. Filepaths not being generated properly. Use the "Application Directory" constant instead of the "Current VI Path" constant to build your filepath. 
aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 11
(607 Views)

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

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 11
(599 Views)

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?

Download All
0 Kudos
Message 6 of 11
(593 Views)

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.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 11
(559 Views)

@aputman wrote:
  1. 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 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 11
(554 Views)

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.

0 Kudos
Message 9 of 11
(532 Views)

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

aputman_0-1707164484506.png

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 10 of 11
(529 Views)