Part of the programme that i've written is to generate an excel report and save it as an excel file, the name of which is specified by the user. It works fine when it is not compiled. However, after compiling into an executable file, it refused to work. After the user has specified the file name, nothing was saved. Could anybody tell me the possible reasons for that?
A look at the code would certainly help in this case, but a cursory guess would be that if you are using the 'Current VI's Path' primitive to derive the directory path for your file that you need to strip the path again for exe's only. The path for abc.vi in the development system is 'pathname'\abc.vi in the runtime system it is 'pathname'\abc.exe\abc.vi.
You can use the app.kind property to determine whether another pstrip of the path is necessary. See attached.
This would be my guess too. I've built very similar applications before and had the same problem you are. It took me days to track down the problem to this, and it was exactly what Spaz suggested. You have to strip the path twice when you're using this as an executable.