LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 43 read spreadsheet file

Solved!
Go to solution
0 Kudos
Message 1 of 10
(8,231 Views)

error 43 = user cancel...

 

Ever read the error description? Ever used error cluster indicators? Ever used the SimpleErrorHandler?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(8,218 Views)

Hi

 

Somewhere was wrong sorry, my fault 🙂

I used the function Read from spreadsheet file but when I pressed  Cancel in file dialog  I got ERROR 43,  I know what is it,  but i dont know how this problem solve.  I would like get for example: one button dialog.  I tried to use solving from link: http://forums.ni.com/t5/LabVIEW/How-to-prevent-error-message-by-using-quot-Rerad-Write-from-to/m-p/1...  but it is only for the function write.  

 

Sorry for so stupid question but im new to labview

 

Thx.

 

Tomas

0 Kudos
Message 3 of 10
(8,207 Views)

Hi Tomas,

 

it makes no difference if it's a FileWrite or FileRead-function - the "user cancel" stays the same...

 

Have a look at the examples coming with LabVIEW. Then read the help for the SimpleErrorHandler. Then use a simple UnbundleByName to get the error state and code to call a CASE structure with your OneButtonDialog...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(8,204 Views)

Thx for your help,

 

 i have tried use your idea,  unfortunately when I use the simple error handler then  i can generate my own label but when i press continue  then it show still the same eror 43 again and it is exactly what I dont want to see.

 

thx

 

Tomas.

0 Kudos
Message 5 of 10
(8,193 Views)
Solution
Accepted by pepis

Hi Tomas,

 

have a look at the other functions in the same palette. There's also an "Error Deleter"...

 

You have to program what you need. Something along the lines of IF Error=UserCancel THEN DeleteError and Continue...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 10
(8,191 Views)

 


pepis wrote:

I used the function Read from spreadsheet file but when I pressed  Cancel in file dialog  I got ERROR 43,  I know what is it,  but i dont know how this problem solve.


The best way to handle this is to use an explicit file dialog. One output is the selected path that you should wire to your read function. Another output is a boolean that indicates if the dialog was cancelled. Use a case structure and do your read function only if the dialog was not cancelled.

 

Message 7 of 10
(8,171 Views)

The spreadsheet read and write vi's don't provide an error out connector.

Message 8 of 10
(8,058 Views)

 


@dj3 wrote:

The spreadsheet read and write vi's don't provide an error out connector.


 

How is this relevant to this thread? Are you replying to a specific post or just commenting in general?

 

Message 9 of 10
(8,051 Views)

Pepis is having the error 43 problem using the Read from spreadsheet vi. Someone is telling him to use the general error handler but that doesn't work as there is no error cluster available to the user. I just got around the problem after posting here by saving a custom copy of this vi and a custom copy of the "Read string from file" vi which is part of the "Read from spreadsheet". The "Read from string" vi contains a general error handler on which I then changed the "type of dialog" flag to zero which stops all error messages. Of course I could have given the custom vi's error clusters and used the applications error handler but that would have required a lot of retesting (and time).

Message 10 of 10
(8,041 Views)