Get Workbook Sheet: Specified argument was out of the range of valid values. Parameter name: index /Get Workbook Sheet: Exception from HRESULT: 0x800401A8

Hello,

as I try to apply to Get Work Book sheet activity I am getting the following error message:

“Get Workbook Sheet: Specified argument was out of the range of valid values.
Parameter name: index”

or this one:
Get Workbook Sheet: Exception from HRESULT: 0x800401A8

This is simply, not possible, as the Work Book is there. Sometimes it is working, especially if I use debug mode. If I use “step in” it works almost always.

Anyone has this problem?
Restarting is not really healping.

Regads,
S

Hope you have specified the index starting with 0. I have got this error before when i tried to pass an index of a page that wasn’t there.
For e.g - if the workbook as 4 sheets and you try to pass an index other than 0-3, it will give this error.

Hi,

This error usually if the workbook doesn’t have that much sheet. For example, usually index starts from 0. so if the workbook has only 4 sheets and u have specified index as 4, then it won’t work.

Thanks for help, but this is not the case.
As I said, the same work flow works in some occasion - especially when started in debug mode. As I am using copy workbook activity, in most of the cases it crashes there. It seems that excel needs more time then Bot.