LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Reading from spreadsheet tool

Hi all, 

 

In my application I am using a Read from spreadsheet function to display the contents of a txt file saved in my computer continuously every 3 mins. This txt file gets updated once approximately every 3 minutes. Now the problem which I am facing is, If the txt files is getting updated at the exact time when the vi is trying to open the txt file it gives an error saying, "file already open!! Continue or Stop" If I press Continue it misses the values from the file. Is there any alternative to avoid this happening. It happens only once or twice in an hour. But still this error becomes fatal as there is a data loss.

 

Can anyone please help find a way to avoid this error.

 

Regards,
Nitz 

0 Kudos
Message 1 of 2
(2,162 Views)

Hi Nitzz,

If you are accessing the same file frequently in two different places then access it using the low level file IO functions.

Open the file reference at start and keep that in memry using global variable or functional global then close the same at the end of the application.

0 Kudos
Message 2 of 2
(2,154 Views)