Object does not contain a definition for get_Range (MS Excel) In C#
Team,
Given that you encounter an error such as Object does not contain a definition for get_Range given the original snippet that shows the error below.
The fix to the code snippet above is to cast the cells with object.
Cheers!
Given that you encounter an error such as Object does not contain a definition for get_Range given the original snippet that shows the error below.
chartRange = sheet.get_Range(sheet.Cells[row_indicator, column_indicator], sheet.Cells[row_indicator, column_indicator + 11]);
chartRange = sheet.get_Range((object)sheet.Cells[row_indicator, column_indicator], (object)sheet.Cells[row_indicator, column_indicator + 11]);
Cheers!
Thanks...:)help me a lot........
ReplyDeletethanks
ReplyDeleteGlad it helped you... ;)
ReplyDeletethanks a million, I ran into the same error and your suggestion did the magic. God bless you
ReplyDeleteHi,
ReplyDeleteYour welcome!
God Bless you too. :)
Thanks!!!!
ReplyDeleteYour welcome! :)
ReplyDelete