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 data from excel in CustTable

(0) ShareShare
ReportReport
Posted on by 207

I need to import from excel Customer(Arabic) name into "CustTable" this field is customized field   and the data stored in "CustTable". How can i Import that data. 

*This post is locked for comments

I have the same question (0)
  • Chandan Sharma Profile Picture
    1,115 on at

    You can create a job to import the data through excel as CSV doesnot supports arabic.

    the code will be somewhat as below

      custtable custtable ;

       SysExcelApplication application;

       SysExcelWorkbooks workbooks;

       SysExcelWorkbook workbook;

       SysExcelWorksheets worksheets;

       SysExcelWorksheet worksheet,worksheet1;

       SysExcelCells cells,cells1;

       COMVariantType type,type1;

       int row=0;

       int inserted =0;

       Accountnum  accountnum ;

       Dialog dialog;

       DialogField dfFileName;

       FileName fileName;

       #file

       #AviFiles

       ;

       dialog     = new Dialog("Pick the file");

       dfFileName = dialog.addField(extendedTypeStr(FileNameOpen));

       dialog.filenameLookupFilter(["All files", #AllFiles]);

       if(dialog.run())

       {

           filename =  dfFileName.value();

       }

       application = SysExcelApplication::construct();

       workbooks = application.workbooks();

       workbooks.open(filename);

       workbook = workbooks.item(1);

       worksheets = workbook.worksheets();

       worksheet = worksheets.itemFromName("ArabicNames");

       cells = worksheet.cells();

       do

       {

           row++;

           custtable .clear();

           accountnum = cells.item(row,1).value().bStr();

           custtable =custtable ::find(accountnum ,true);

           if(custtable .recid  > 0)

           {

               ttsBegin;

               custtable .ArabicName = cells.item(row,2).value().bStr(); //replace arabicname with your field

               custtable .update();

               inserted++;

               ttsCommit;

           }

           type = cells.item(row+1, 1).value().variantType();

       }

           while (type != COMVariantType::VT_EMPTY);

       info(strFmt("%1 records updated out of %2", inserted,row));

  • Suggested answer
    DavidGunawan Profile Picture
    1,381 on at

    Hi,

    You can use excel add-ins to export and import data from/to AX.

    For more detail in your case, you can follow the link below.

    ax2012exceldataimport.blogspot.sg/.../dynamics-ax-2012-customers-import-using.html

    With this you also able to import the customized field only and It's simpler (In the case of the Customer data is exist and you just want to update the customized field).

    Regards

  • Suggested answer
    Martin Dráb Profile Picture
    237,829 Most Valuable Professional on at

    The recommended way for importing data is the Data Import Export Framework.

  • DEEPAKNONU Profile Picture
    207 on at

    thanks for response but Mr. Martin Drab in AX2012 Feature Pack Layer their is no any module for Data Import Export Framework it's available in AX2012 R2,R3. but i have ax2012.

  • DEEPAKNONU Profile Picture
    207 on at

    Thanks Mr.Chandan Sharma but i tried this one before but its not working

  • DEEPAKNONU Profile Picture
    207 on at

    Thanks for your response but Mr.DavidGunawan i tried this with excel it shows me you update 100 reccords but after refresh it'll not shows any update

  • Martin Dráb Profile Picture
    237,829 Most Valuable Professional on at

    You didn't say before that you're on Feature Pack. Here is a link explaining how to install DIXF there.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans