10-10-2011 03:36 AM
How to create a .exe file from the .vi file with excel template. Since I am giving only .exe file, the client wont be having the excel templates. So please tell me how to build a .exe file with templates which will be invoked by mainfile.vi. Please let me know if U guys know. (Now in my mainfile.vi I am using local file location path to invoke)
10-10-2011 08:39 PM
Hi Kudos,
I am one of application engineers from NI ASEAN.
Please refer to below link.
http://digital.ni.com/public.nsf/allkb/C38CE3F30542D65B86256F0E00740DD8
I assume that your issue is similar with above case and it will help.
Please kindly let me know if you still encounter the same problem or have any other enquiries.
Thank you for using NI products.
Best Regards,
Steve
10-10-2011 09:07 PM
Hi Steve,
Thank you very much for your reply. My problem is not that kind. My problem is,
I have one mainfile.vi file where i used local drive path to specify the excel templates.
Now I want to convert this mainfile.vi in to .exe file and give to client. So the client wont be having this excel template files.
So what I did is I created one project, under this project I created one Data folder which is having my 3 excel templates. So my doubt is how to give path to my mainfile.vi such that the client can execute this program at any PC. Please help me to solve this problem.
Thanks in advance
Thanks & Regards
saamy
10-10-2011 10:28 PM
Hi Saamy,
According to my understanding you want to add excel templates embedded inside exe files in order to open at different PCs.
I am not able to find out exact method. There is another way to work around in order to solve the problem.
You may be interested in using "Current VI's Path" function to get VI's Path.
1) Put the 3 excel templates under the same folder of exe file.
2) Open the 3 excel templates by using <Current VI's Path> + <template name> from VI.
Please let me know if this is ok with you?
Thanks & regards,
Steve
10-10-2011 10:55 PM
thanks Steve,
what you understood is correct. Let me tell my situation to you very clearly.
under C: drive I created one folder "PROJECT_FOLDER" under this folder I have four folders Bin, Data, Doc, Img.
Under Bin folder I have Main.vi file and subvi folder which is having subvi files.
Under Data file i have 3 excel templates
Now I created one new project. in this project I have chosen "PROJECT_FOLDER" as autopopulating folder.
Now my unname1.lvproj will have "PROJECT_FOLDER". As you said if I use current vi path to my main.vi file its showing"C:\PROJECT_FOLDER\Bin\main.vi".
So now can able to give my excel-template name instead of main.vi. My question is will it work in other PC if i convert this in to .exe file(Coz its showing C:\PROJECT_FOLDER\Bin\.... )
10-11-2011 01:31 AM
Hi saamy,
I have tested it out at my PC and it is working.
I have tested with MS office report and put the template "Excel Template.xlt" under VI's folder (C:\temp) and make the exe file.
After the exe file has been moved to other place(C:\build) and has been executed, the exe file try to locate "Excel Template.xlt" under both C:\temp and C:\build. As long as the template is the same folder with exe file, it is working.
Pls refer to attached file.
Hopefully it will help. Please let me know the result.
Thanks & Regards,
Steve
10-11-2011 01:39 AM
Thank you so much Steve, Sure I will try and let you know the result.
10-11-2011 01:46 AM
Hi Steve, am not able to open your files...its showing some error. I think yours is latest version than mine. Please chk the attachment. my labview version is 10.0 (Labview 2010)
10-11-2011 02:39 AM
Hi saamy,
I recreate exe by using LV 2010. Pls try again.
Regards,
Steve
10-11-2011 02:46 AM - edited 10-11-2011 02:48 AM
Thank you so much steve..I think am giving you more trouble, sorry for that...:) i can able to run application.exe this time..& you forgot attach the.vi files at this time. If you send that to me, then i can see how u set path for that. can u send me that .vi file