LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spreadsheet

Hi,
    I am using Labview 8.2. I am collecting data using "write to spreadsheet file(DBL).vi" . After collecting data, I need to delete these file.
But, Not able to delete these file. Why is that? How can I do that?
 
Please let me know..
Thanks
Jey
0 Kudos
Message 1 of 10
(3,910 Views)
You should be able to use Delete in the Advanced File Functions palette.  Write To Spreadsheet File doesn't return a file refnum, just a path, so I'd assume it does all the file open/write/close stuff for you.  How are you trying to delete the file? Do you get an error?
0 Kudos
Message 2 of 10
(3,899 Views)
yeah I'm not clear what your problem is, I did a little mock up and everything seemed to work fine.
 
1. write (specify path)
2. read
3. delete
 
 
0 Kudos
Message 3 of 10
(3,890 Views)
Hi,
I found a discussion on deleting files.

http://forums.ni.com/ni/board/message?board.id=170&message.id=5813&query.id=12368#M5813

Hope this helps.

Jae Ho
0 Kudos
Message 4 of 10
(3,885 Views)
Thank you Guys,
                          Now I able to delete these files.
 
One more thing, It is a huge file, It collects data for every seconds. The test run for 17 days.
In the middle of a test,The test program get frozen. Because of lack of memory.
So, Just want keep the last 2 hour data or 200 rows of data (for example).
How can I implement this? Is there is any function available to limit the data.
Because time to time we need to check the data. Only want to keep for the latest data.
 
Thanks
Jey
0 Kudos
Message 5 of 10
(3,876 Views)
Programming > File I/O > Advanced File Functions > Get Byte Size
 
You can check the size of the file with this function.  If it gets too big, delete it, else, just let it run.
0 Kudos
Message 6 of 10
(3,867 Views)

Thanks for the support.

Jey

 

0 Kudos
Message 7 of 10
(3,864 Views)
Smiley Indifferent    One question: When i create a Spreadsheet file on my VI i cant acces it directly from Exel because it says that it is being used by another program.....
 
The thing is that while the program is running i need to send this files over internet and i cant because of these...
 
¿How ca i close a spreadsheet file?
0 Kudos
Message 8 of 10
(3,482 Views)
Hi isaac84,

Have you tried the close file vi from programming>>File I/O> Close File?

Give that a try, if not, please provide more information

Thank you
Van L
NI Applications Engineer
0 Kudos
Message 9 of 10
(3,457 Views)

Hello Van

Yes the problem was solved with close file, Write to spreadsheet file VI has no opening or closing operation need, is just that i wanted to write headers to the file but only once when i created the file, so i try to create the same file every time i write to it, if an error ocurs then the file has been already created and no need of writing headers again, once opened the file i must close it afterwards.

 

Thanks for the advise

0 Kudos
Message 10 of 10
(3,453 Views)