LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent error message by using "Rerad/Write from/to spreadsheet file.vi" when pressing Cancel?

Hello,

 

I am using the "Rerad/Write from/to spreadsheet file.vi" and it works fine. But when I press "Cancel" in the datafile dialog, I have an error message "Fehler 43 ist bei Open File+.vi:File Dialog aufgetreten" because of the user abort.

 

Is there a possability to prevent this error message?

 

Best regards,

Michael

0 Kudos
Message 1 of 8
(4,402 Views)

Good morning!

If you link the error out from the read/write vi to a indicator (right click-> create-> indicator) you dont get a error message.

ok?

GruBe

0 Kudos
Message 2 of 8
(4,398 Views)

Hello,

 

the VIs ("Write to spreassheet file.vi" and "Read from spreadsheet file.vi") have no error out. Linking an indicator at the error out from the read/write vi is not possible, because the VIs ("Write to spreassheet file.vi" and "Read from spreadsheet file.vi") are protected, so I can't change anything inside the VIs.

 

Any other ideas?

 

Thanks a lot.

 

Best regards,

Michael

0 Kudos
Message 3 of 8
(4,385 Views)

Hi,

 

you could use an explicit file dialog instead of leaving the path input empty. Then you are able to check for a valid path before calling the spreadsheet VI.

 

\Ulli.

 

0 Kudos
Message 4 of 8
(4,379 Views)

I modified those VIs, and made an error output cluster in there myself, because I had identical problems. On the error out I either connect an indicator or a case.

 

Just double click that 'read from spreadsheet vi' when its on the block diagram, look for the 'general error handler.vi', and replace it by an indicator. Switch to the front panel, right click the VI icon -in the right top-, select show connector, and connect that error cluster to where you want it to be.

0 Kudos
Message 5 of 8
(4,362 Views)

If the path is empty dont allow the spreadsheet file to read or write.

 

17207i18D2419D52E7A0A8

0 Kudos
Message 6 of 8
(4,352 Views)

that works, but sometimes I have encountered cases where a dialog allowed you to pick a file, when it was read later on. In the mean time the user could move or delete the file, which of course happened -against my anticipation 🙂 -

I'd like to use the 'valid file or folder' VI to check if its still there.

0 Kudos
Message 7 of 8
(4,346 Views)

You can check it in a particular folder whether it is valid file or not and return back.

0 Kudos
Message 8 of 8
(4,342 Views)