Download excel with multiple sheet

I am using Worksheet_SelectByIndex() excel function to create more than one sheet for same worksheet file.

I am using same function for 2 sheets with worksheetnumber = 1 and 2 respectively for same excel book.

But at the time of second sheet it throws an error

"Index value not exist in the dictionary".

Are you using any components to do this?

There are several Excel extensions. The top 3 are:

  • Advanced Excel
  • Excel Package
  • Office Utils

I would try to use Advanced Excel.

Nuno Verdasca


Are you using the Advanced Excel component? It's easier to get support if you start a topic in the Support tab, as all creators are notified:

Reading the documentation, you should be invoking the Workbook_AddSheet action before calling Worksheet_SelectByIndex - have you tried it?

I am using Excel_package into it I am using 


selectWotksheet() - here I am assigning worksheet number as 1 for 1st sheet

for second sheet I am assigning worksheetNumber 2

it throws an exception as

“given key not present in the dictionary”