LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

*.exe requires text file -> error

Hi,

 

i created an installer+executeable file out of my project. After installing the files and starting the application the following error occurs:

 

Error 1 cannot Open/Create/Replace a file in write spreadshet string.vi -> write spreadsheet file (DBL).vi  (translated ger -> eng)

 

I am completly new to to LabVIEW and i was told to create this installer for my superior. It has to work but unfortunately i dont know exactly how to handle with this issue.

 

Regards,

 

Andreas

0 Kudos
Message 1 of 4
(2,687 Views)

Hi Andreas,

 

you probably run into the problem of changed paths in an executable. The executable adds a folder to the path ("\project\my.vi" changes to "\project\my.exe\my.vi"). When you use the "Current VI path" file constant you have to strip one more folder to get a valid directory!

 

This is asked quite often, so you will find a lot of example how to check the run time system used by the VI to differentiate between development system and executable...

 

On "how to handle this":

- The problem isn't a missing text file, it's about not being able to open/create a text file.

- You should always handle the error cluster generated by such functions, it contains valuable information about the error!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,677 Views)

Thank your for your fast reply. I have checked the solution you have me but i couldn't fix the problem.

Attached is a screenshot of the part which produces the error (i think). The *.vi file itself is working without problems at its root computer.

screen-bearb.JPG
0 Kudos
Message 3 of 4
(2,661 Views)

Hi andreas,

 

don't know why you're converting a string to a path using "Build Path" - that's why there also is a simple conversion function "string to path"...

 

You should try to catch that error by inserting some debugging features like an indicator for the used path. You also should try to show the full error message - look inside the "Write to spreadsheet file" on how to do it. (And use a copy of that function in case you want to change it's functionality!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,654 Views)