cancel
Showing results for 
Search instead for 
Did you mean: 

Yes/No decision in Excel VBO

Fran.Woodcock
Level 4

Hi all, I'd be very grateful for some help with the MS Excel VBO... I am trying to save a workbook, with a single handle of 1, and the 'Save Workbook' action is throwing me an error of there being no yes or no decision.  I have traced it back to the CheckInstanceHandle stage within the VBO but I am not sure what to do about it... I have tried changing the action to Save current workbook but it doesn't actually perform the save action despite moving to the next action (so not sure what that's about).

This is the stage to which I have traced the issue:

19510.png

Annoyingly this is coming up right at the end of my build having previously worked... I have recently updated the MS Excel VBO to version 10.1.10...

Help gratefully received 🙂

Thanks

Fran



------------------------------
Fran Woodcock
------------------------------
4 REPLIES 4

diane.sanzone
Level 7

Hi Fran,

Based on that screenshot and assuming the decision stage is, in fact, referencing the "HandleMissing" data item, it appears that data item has no value. Therefore, if the decision stage contains the expression [HandleMissing], that error is valid (the data item has no value so you can't decide if it's true or false - it's just NULL).  You need to determine why that data item has no value at this point in the code.  

My version of the VBO is older, but does not contain the block/recover/resume around the "Check Handle" action.  My guess is that code stage is throwing an exception and the recover/resume is allowing the flow to continue through to the decision stage without first setting the flag (that is the output to the Check Handle code stage).  Assuming this is the unaltered version of the VBO, that flow doesn't seem right to me.  I would recommend either:

  1. remove the block/recover/resume and allow the exception to bubble up to the process OR
  2. set the HandleMissing data item to "true" as the initial value, that way if the handle is valid the page will end successfully and if the handle is invalid it will properly flow through to the "Bad Instance Handle" exception

I hope this helps and if I'm totally off base, please do provide additional detail so we can work through this.

Good luck!



------------------------------
Diane Sanzone
------------------------------

Mukeshh_k
MVP

Hi @Fran.Woodcock - Just to be sure on few things - I am hoping you are using the same MS Excel VBO object that was used to open this workbook in first place? and If you aren't renaming the workbook and just saving it with its default name - close instance has a "savechanges" flag which could be set as true without having to use the save workbook action.  

Also, as rightly pointed by Diane - the recover block around this code is catching the exception on failure and resume stage is killing the exception- as the code stage has failed it is resulting in failure of setting any flags for Data Item "Handlemissing" - you need to get rid of this recover and resume stages around the code stage and let it fail - it will help you to understand why this code stage has failed and then need to traceback what has caused this error.

19501.png



------------------------------
Regards,

Mukesh Kumar
------------------------------
Regards,

Mukesh Kumar

PeterHeyburn123
Level 3

Hi Fran,

I have encountered this error when using Excel actions from different objects, for example creating an instance and opening the workbook using the default VBO and then attempting to carry out an action in the excel file using an extended VBO. Try changing all your actions to use the same VBO and it should solve the issue.

Peter



------------------------------
Peter Heyburn
------------------------------

Oh my goodness that was it - I was using the standard VBO and I should have been using the extended one... I've been using the standad on ein other stages and I forgot I was using the other one on this page...

Thanks so much! SO simple...

Fran



------------------------------
Fran Woodcock
------------------------------