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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Sample code to import data from Excel in ax 2012.getting the following error

(0) ShareShare
ReportReport
Posted on by 25

"Stack trace: Invalid attempt to call SysExcelApplication.construct running in CIL on the client."

if we can use sysexcel then what is the option any reference.

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi,

    Are you using SysExcelApplication in a batch process?

  • Axbeginerss Profile Picture
    25 on at

    yes...thats the place i am getting the error.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    I don't think you can run SysExcelApplication in batch class. It only works on client.

    Can you not use DIXF for importing excel files?

  • Axbeginerss Profile Picture
    25 on at

    As per the client requirement ..i cant use DIXF so..do u have another option that can help to import data from batchjob any reference??

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    I think importing using CSV files will be the easiest to implement. Will that be an acceptable solution or do you clients want to import excel files only?

  • Axbeginerss Profile Picture
    25 on at

    Only excel ...any suggestions.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Have you already tried something like what is mentioned in this link?

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,095 on at

    Hi Axbeginerss,

    You can take a look at EPPlus library as well

    github.com/.../EPPlus

    stackoverflow.com/.../epplus-read-excel-table

  • Suggested answer
    Andre Ghazaleh Profile Picture
    870 on at

    You can't use SysExcelApplication from a batch job that executes on the server. If you cannot use the DIXF, remember that you are not bound to X++ , why not use C#.net and then consume the .net assembly in AX? If you want to follow this approach, it's explained in this Link 

    And if don't want to use C#.net use the CommaTextIo class to import csv file (you have to convert the excel file to csv) 

    Best regards..

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 622

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 553 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans