10-05-2010 01:55 AM
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
10-05-2010 02:19 AM - edited 10-05-2010 02:21 AM
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!
10-05-2010 03:39 AM
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.
10-05-2010 04:33 AM
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!)