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
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
Hi,
Please refer below link for Excel AddIns process
ax2012exceldataimport.blogspot.in/.../dynamics-ax-2012-excel-add-in-vendor.html
Thanks & Regards:
Edwin.X
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.
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
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++.
see if this link can help you out?
community.dynamics.com/.../import-ledger-ap-and-ar-invoice-journal-lines.aspx
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156