LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to spreadsheet file and always replace

How do i get the write to spreadsheet file vi. to always write a text file and always replace the file. Ie. I want it to take the input data array and output a file (with replacement) WITHOUT a dialog box asking me if i want to replace the file. I want the vi to just replace the file. I'm using a mac and i have labview 7.0. I have attached the vi that i'm using. Look to the right of the diagram where the write to spreadsheet file vi. is located. Any help with this issue would be greatly appreciated.

Matt
0 Kudos
Message 1 of 5
(3,222 Views)
Just delete the file before writing to it. See attached pic.

Tim
0 Kudos
Message 2 of 5
(3,222 Views)
There's no really good answer for this. You can either delete the file beforehand ("Delete" from advanced file i/o palette) or you can use "New File", "Write File" and "Close File". In the latter case, wire TRUE to the "Overwrite" input of "New File" and use "Array to Spreadsheet String" to format you data before handing it over to "Write File".
0 Kudos
Message 3 of 5
(3,222 Views)
To eliminate the dialog, you need to modify Write to Spreadsheet File. Inside the function is Open/Create/Replace File. This has an unwired input for advisory dialog. Wire a false Boolean constant to it or connect it to a front panel terminal that is wired to the connector pane. Save the modified VI under a different name.
0 Kudos
Message 4 of 5
(3,222 Views)
it seems to be working. thanks.

matt
0 Kudos
Message 5 of 5
(3,222 Views)