LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt for loading Csv file for spreadsheet Read VI in Executable

Greetings All, 

   I am saving the Csv file but when I read the saved file in a Development environment, I get this OK and program runs without any Prompt, but when I build executable, it ask for the prompt for the file, I don't know what the issue is, as i am saving many intermediate temporary files, i need to find a solution. here are the steps I am using. 

1. Generating the temporary folder with the date and time string.

harjeemann_0-1610095077750.png

2. Converting the XLS File in CSV FIle Format.

harjeemann_1-1610095162419.png

3. Reading the saved file with, Read delimited Spread string.

harjeemann_2-1610095273723.png

As mentioned, the development environment everything is fine. In exe format, I am getting a prompt to select the file.

 

Any support or lead will be helpful, any other information needed will be provided

 

Regards

Harjeet

 

0 Kudos
Message 1 of 7
(1,908 Views)

If you would actually attach a demo VI or Project that we could actually run and observe the behavior for ourselves, we could undoubtedly tell you exactly where the problem lies.  

 

Bob Schor

0 Kudos
Message 2 of 7
(1,876 Views)

Most likely the input to the function in step 3 is an empty path.  You can verify this by adding a popup message box in your exe to probe the input.  If this path is read using a local variable from the path in step 2, then you could have a race condition that behaves differently when compiled.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 3 of 7
(1,854 Views)

You have to provide full path to EXE.

example C:\path\to\file.csv not just file.csv.

please set this as ANSWER or KUDO this post, if it help you.


Message 4 of 7
(1,838 Views)

Greetings All, 

  First of all Thanks for some support.

1. The Program is big but I will disable some Vis and provide the project. 

2. I have looked around the race around conditions also.

3. I have also Build the Eye on the other PC with complete Project, so that the paths of the FGV and Vis can be correct. It gives the same behavioure. 

 

I have never seen such problem, i know defiantly i and doing some thing wrong. 

I will provide more information 

 

0 Kudos
Message 5 of 7
(1,815 Views)

Greetings All, 

Attaching the Zip File, of my project for Reference.

Have strong doubt some thing is going wrong in this area, i really have no idea what i am doing wrong.

 

It is very frustrated, you finished the codes and build this and everything, declare your Work and now the things are not working on others tem members PC. and you become one source to be looked at by every one 🙂

 

 

harjeemann_0-1610910774449.png

 

Regards

Harjeet 

0 Kudos
Message 6 of 7
(1,812 Views)

It does appear that the Project you attached is "missing some pieces".  

 

You appear to be using an external Library to read Excel files.  The Project that you attached is missing some of these, such as XL_RANGE_WriteString.vi, XL_WORKBOOK_Save.vi, and FGV_High_Excel.vi.

 

There are a number of third-party Libraries that can open an Excel Workbook (*.xlsx) and extract data from its Worksheets, allowing you to use native LabVIEW File routines to write (and later read) such data as Comma-separated-values (*.csv) text files.  You can also use the Report Generator Toolkit from NI (depending on your License level) to open and read from native Excel files.

 

I would try writing a small routine that just opens the Excel file you need to read and extracting some data.  If it works, gradually add functionality from the routine you attached and see where it fails.

 

Bob Schor

 

 

0 Kudos
Message 7 of 7
(1,796 Views)