Write Cell:The given key was not present in the dictionary. Error


I’m trying to do some excel activities and unfortunately I’m getting this error. When I try to write the value in to the cell, this error pop-ups. My excel sheet have a specific format with some equations .Could anyone please help me in this?


This error occurs when trying to access a dictionary using a key that does not exist.

A dictionary is a special form of array arranged by Keys and Values. Every key must be unique and you then use that key to access it’s corresponding value.

e.g. a dictionary may look like dictionary = {A:“Apple”,B:“Orange”,C:“Pear”} If you ask for the value dictonary(A) you will get the value Apple.

if you have a process that doesn’t Always have the required key you can use the Key Exists activity to check before you try and access it.

Or use a try catch to catch the key does not exist exception and handle the error that way.

1 Like

I’m telling about Excel activities…There is no dictionary in my workflow.

1 Like

Can you try running the write cell activity individually and please let me know the result @FEMI_MARIYA_BINOY


I tried. Again getting error.

1 Like

Can you try giving the entire path of the excel @FEMI_MARIYA_BINOY

I tried…Still getting the same error.


Are you reading a config file based on that you may get this error


We are not using config file.

I’m getting the same error on the same kind of activity. I’m using a config file, but the same variable is used in the previous step within the invoke and it works fine. I copied and pasted the variable and argument that make up my file path from one activity to another and in the activities that use it prior to this activity I don’t get the error message.

1 Like


Initially I have this error. after I changed the cell range “A12:A12” like this. It is working…


1 Like

We can’t do hard coding like this.


Did you try using the Excel “Write Cell” Activity rather than the System one?

Also, if you can provide a .xaml file with the problem I can take a look.


I’m getting the same error on the Append range activity. I am trying to copy data from one excel workbook to another one. First I am copying the data by read range activity and then i am pasting data to my final workbook by Append range activity this is where i am getting this error.

Same error I’m also facing… All arguments are correct and I checked in the message box, I’m getting values also… But I don’t what is the issue .


I’m also having this problem. Did you ever find a solution?

Note - I can’t use excel application scope in my case (it gives other problems).

1 Like

Instead of dictionary I used a datatable and updated the datatable row with the specified value. Then i wrote the datatable in to the excel.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.