LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save a File to Disk using Build Path in Executable

I have a simple XL Report that creates and saves a file in a specific location on Disk.

Works perfectly in the development environment.

It does not work when built as an executable.

 

LabView 2011. Windows 10

 

Any suggestions?

 

KM

0 Kudos
Message 1 of 8
(3,317 Views)

Hi, DeOdderKeith!

If you're saving a file to a C:\ path, try to run your executable as administrator. Maybe your program just don't have enough privileges to save file at this location.

0 Kudos
Message 2 of 8
(3,307 Views)

Without your "Build Path__ogtk.vi" we can't see what you are doing wrong.

RTSLVU_0-1581357285564.png

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 8
(3,285 Views)

@Sam_Rudneff wrote:

If you're saving a file to a C:\ path, try to run your executable as administrator. Maybe your program just don't have enough privileges to save file at this location.


That's one of the main reasons I tend to always save my data to the Public Documents.



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 4 of 8
(3,280 Views)

The openg variant of build path makes no difference here. (The only difference is that it accepts arrays, see See here, fo example  ).

0 Kudos
Message 5 of 8
(3,274 Views)

Are you testing on a different or on the same computer?

If different, does it contain the same version of office? Does C:\data exist? Is the app allowed to write to it? Do you get any errors?

 

As others already said, writing to the root (or close to) the root of the drive is not recommended.

 

LabVIEW 2011 is not supported in windows 10, so there could be other issues.

0 Kudos
Message 6 of 8
(3,270 Views)

I was sent this article which seemed to allow the application to run properly.

I'm about to test it on "The Big App" in a few mins

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019O6PSAU&l=en-US

 

KM

0 Kudos
Message 7 of 8
(3,251 Views)

@DeOdderKeith wrote:

I was sent this article which seemed to allow the application to run properly.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019O6PSAU&l=en-US


Yep, been there.  Since the Report Generation Toolkit dynamically loads the object that is needed, the app builder does not know it needs to include the Excel class.  So you have to add that library/class to your project and then "Always Include" it in your application.



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 8
(3,241 Views)