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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Import from excel file using X++

(0) ShareShare
ReportReport
Posted on by 3,805

Hi all..

I have excel file with field and records like Invoice Journal.

I want import from excel file into Invoice Journal using X++.

Can you help me?

Thanks all..

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    see if this link can help you out?

    community.dynamics.com/.../import-ledger-ap-and-ar-invoice-journal-lines.aspx

  • Verified answer
    Tommy Skaue Profile Picture
    Moderator on at

    While it is possible, you should benchmark the performance of your import. In my experience, sitting "outside" of Excel and reading data from a spreadsheet does not perform very well. So if your spreadsheets contain thousands of rows, you may consider using text files instead, exported from Excel of course. It might very well be this is now performing a lot better since the last time I tried connecting a spreadsheet from X++.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    Instead of writing code to import from Excel, you can use Excel Add-ins to do this.

    please refer the following topic on how to use excel add-ins

    http://technet.microsoft.com/en-us/library/hh781099.aspx 

  • Verified answer
    Brandon Wiese Profile Picture
    17,788 on at

    Like Tommy indicated, talking to Excel over COM from within X++ is extremely slow.  We do quite a lot of importing from Excel, and for MANY reasons (not just performance), we either use XML Spreadsheet 2003 documents (which users can still open and edit with Excel directly), or when forced to use XLS files they can be read as XML files with some light code changes to SysExcelCells object, adding a value() method..

    public str value(str _value = '')  // returns XML Spreadsheet 2003

    {

       COMVariant  ret;

       ;

       if (!prmisdefault(_value))

       {

           ret = cells.value(#xlRangeValueXMLSpreadsheet,_value);

       }

       else

       {

           ret = cells.value(#xlRangeValueXMLSpreadsheet);

       }

       return ret.bStr();

    }

    This lets you return an entire worksheet from a workbook as an XML Spreadsheet 2003 XMLDocument, which is easy and fast to read in X++ directly, even on the server tier.  

    Hope this helps.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    Please refer below link for Excel AddIns process

    ax2012exceldataimport.blogspot.in/.../dynamics-ax-2012-excel-add-in-vendor.html

    Thanks & Regards:

    Edwin.X

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans