# The number of arguments provided is different from the number of arguments accepted by the method

**URL:** https://www.dynamicsuser.net/t/the-number-of-arguments-provided-is-different-from-the-number-of-arguments-accepted-by-the-method/54245
**Category:** Technical Forum
**Created:** [August 7, 2014, 4:24pm UTC](https://www.dynamicsuser.net/t/the-number-of-arguments-provided-is-different-from-the-number-of-arguments-accepted-by-the-method/54245 "2014-08-07T16:24:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rajesh3110](https://avatars.discourse-cdn.com/v4/letter/r/5f9b8f/32.png) [@Rajesh3110](https://www.dynamicsuser.net/u/Rajesh3110)
#### Post date: [August 7, 2014, 4:24pm UTC](https://www.dynamicsuser.net/t/the-number-of-arguments-provided-is-different-from-the-number-of-arguments-accepted-by-the-method/54245/1 "2014-08-07T16:24:34Z")

</div>

**"The number of arguments provided is different from the number of arguments accepted by the method"**

The above error getting while importing the excel file. if anybody knows the solution, please help me to resolve the error

Thanks in advance.

---

<div class="post-metadata">

### Author: ![afsarkhan](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@afsarkhan](https://www.dynamicsuser.net/u/afsarkhan)
#### Post date: [August 7, 2014, 4:38pm UTC](https://www.dynamicsuser.net/t/the-number-of-arguments-provided-is-different-from-the-number-of-arguments-accepted-by-the-method/54245/2 "2014-08-07T16:38:41Z")

</div>

check your COM object or you are suffering from following COM error. Try to do same steps mentioned in following link it will resolve your problem.

[http://mafsarkhan.blogspot.com/2011/03/error-executing-code-method-has-been.html](http://mafsarkhan.blogspot.com/2011/03/error-executing-code-method-has-been.html)

-Afsar

[http://mafsarkhan.blogspot.com](http://mafsarkhan.blogspot.com)

---

<div class="post-metadata">

### Author: ![Rajesh3110](https://avatars.discourse-cdn.com/v4/letter/r/5f9b8f/32.png) [@Rajesh3110](https://www.dynamicsuser.net/u/Rajesh3110)
#### Post date: [August 7, 2014, 4:45pm UTC](https://www.dynamicsuser.net/t/the-number-of-arguments-provided-is-different-from-the-number-of-arguments-accepted-by-the-method/54245/3 "2014-08-07T16:45:42Z")

</div>

do i need follow any one of the work around or all?

because i did two things in that

1. Enable the checkbox _Run this program in Compatibility mode for_ and select _Windows XP (Service Pack 2)_
2. _Disable Window Ghosting as described in this post. please suggest me which is the best one in that link_
