Notifications
Announcements
No record found.
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
see if this link can help you out?
community.dynamics.com/.../import-ledger-ap-and-ar-invoice-journal-lines.aspx
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++.
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
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2