web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by 916

Hi,

I'm trying to import data to ax using EXcel.i still getting the error message :

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

Update post : 

The solution is  :

boolean importLines()
{
    SysExcelApplication         application = SysExcelApplication::construct();
    SysExcelWorkBooks           workBooks   = application.workbooks();
    SysExcelWorkSheets          workSheets;
    SysExcelWorkSheet           workSheet;
    SysExcelCells               cells;
    
// the solution is puting the bellow line code  after initializing SysExcelApplication
application.displayAlerts(false);
//.... code

//and In the end
application.workbooks().close();
application.quit();
application.finalize();
application = null;
}

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,030 Super User 2025 Season 2 on at
    RE: The number of arguments provided is different from the number of arguments accepted by the method.

    Hi Alex,

    Can you provide some more information? Did you customize some parts of the Excel interface classes?

    Do you also get the error when you compile the related objects?

  • Martin Dráb Profile Picture
    236,279 Most Valuable Professional on at
    RE: The number of arguments provided is different from the number of arguments accepted by the method.

    And which of those four methods throws the error?

  • Verified answer
    ALAhmed Profile Picture
    916 on at
    RE: The number of arguments provided is different from the number of arguments accepted by the method.

    Thank for the reply,i found the solution

    Please see the update of the question.

  • Martin Dráb Profile Picture
    236,279 Most Valuable Professional on at
    RE: The number of arguments provided is different from the number of arguments accepted by the method.

    Please find which method is throwing the error. We can't debug your system and guessing isn't a very effective troubleshooting technique.

    I would also get rid of the catch swallowing all exceptions; ignoring errors may put your system into an inconsistent state.

  • Fawad Ahmad Profile Picture
    61 on at
    RE: The number of arguments provided is different from the number of arguments accepted by the method.

    I also have same error.  

    I using do While loop for excel data  when row++

    this type of error generate.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans