cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Select stage giving invalid index error

AnthonyMullen
Level 4

HI 

I would like to remove some rows from an excel file. I have followed process below

  1. Create instance.
  2. Open workbook.
  3. Show excel.
  4. Select

I only have 1 file and 1 handle.

ON step 4 I am getting error below. Can anyone help with this please?

Exception : Failed to select row: Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))



------------------------------
Anthony Mullen
------------------------------
5 REPLIES 5

Mukeshh_k
MVP

Hi @Anthony Mullen - It must be throwing the above error as a result of how you are passing the data input and if you need to delete/remove some rows - you can pass the range like this for the delete rows Action, see below snippet - Range to delete is from 3rd Row to 6th Row ("3:6") -

15080.png

and if you need to remove a single row - you can use the Delete row action : 

15081.png



------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

HI,

I am using version 6.8.3 and I dont have the extened excel. I only have Select and Delete actions.

can you help with this please?

Kind regards



------------------------------
Anthony Mullen
------------------------------

Hi @Anthony Mullen : You can find the MS Excel Extended VBO here : MS Excel VBO - Extended -(Note that - If you are using any MS Excel VBO - it needs to be the same object which should be used to open the instance and workbook (Handle should be from same object) - else you might encounter Key not found error.



------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

Hi Mukesh

thanks for this.

I will try this tomorrow and get back to you.

However have you any idea why the orginial excel is not working?

Kind regards



------------------------------
Anthony Mullen
------------------------------

Hi @Anthony Mullen : Mate try passing the Cell reference as below - it should work :

15096.png

15097.png



------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS, England, United Kingdom, GB
------------------------------
Regards,

Mukesh Kumar