Showing results for 
Search instead for 
Did you mean: 

File Path browse take too long time

Hi all,


I am new one and I just start  learning and implementing labview program. Now I am develping data convertion program. My program purpose is 

(1) reading data from input text file

(2) do data calculation and convertion as the required format.

(3) formatted data write to text file or Excel file.



(a) I use' file path  ' from control palette. When I click on " browse folder" icon to choose the path of my input file or output file,it took too long to get there. I already tested and tested again . but I can't find the solution.


 (b) when I write calculated data to text file or excel, for a big amount of data, text file is ok. excel sheet show error if data is over 65536 rows. I want to know how to create and add data to new excel sheet if current sheet is full



So, I attach my project and sample input text file. I really need help from you all.  Thanks






Download All
0 Kudos
Message 1 of 3

Your code needs a good cleanup.  I suspect the reason that your File Path browse button doesn't respond quickly is because you don't have any wait inside your while loop.  That means the loop is running as fast as it possibly can, even though you don't even have a file open to process, which keeps the processor busy and prevents it from doing anything else (like opening the file selection dialog).  Try adding a 100ms wait somewhere in the big while loop.


It's good practice to keep your LabVIEW diagrams smaller than the size of your screen.  You have a lot of bends in your wires, which makes them hard to follow.  You don't need an enormous sequence structure outside of everything since it only has one frame, and in fact you probably don't need any sequence structures at all.  In your for loop, use a shift register instead of reading from and writing to a local variable.   Use the "Spreadsheet String to Array" function to separate your tab-delimited data; it will be much easier than the way you're doing it.


The 65536 row limit is in Excel.  The easiest thing for you to do is to keep track of the number of rows you have written to the file, and whenever it reaches 65536, create a new file.  Since you're writing to a text file there's no way to create a new sheet.  To create a real Excel workbook with multiple sheets, you will need to look at the examples of how to use ActiveX to control Excel.

0 Kudos
Message 2 of 3

The whole while loop should be eliminated. Why would you want to read one line at a time? Use Read From Spreadsheet File.


I would recomend that when you cleanup the code, you use the event structure instead of polling the front panel controls.

0 Kudos
Message 3 of 3