LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt for overwriting a file in "Write to Spreadsheet File" vi

Problem:

I am sending a 1-D array to "Write to Spreadsheet File", which opens a dialog box to where I save the data. I understand that I can overwrite or append a file. However, when set on overwrite, I would like a prompt that says "Are you sure you want to overwrite this file?" So I accidentally don't overwrite some data I need. Is there a way to do this within "Write to Spreadsheet File"?

 

Thanks!

0 Kudos
Message 1 of 2
(4,157 Views)

No.

 

What you need to do is put your own File Open dialog ahead of  the Write to Spreadsheet File.  Once a file is picked, check to see if the file exists.  If it is, then you ask the question in a dialog box.  Put the Write to Spreadsheet file in a case structure so that it only executes if the person answered OK.

 

The File Dialog Express VI in the File I/O >> Advanced palette can help you here.  It has an Exists? output.

0 Kudos
Message 2 of 2
(4,152 Views)