Use Excel Import Def. Groups to update existing Axapta Data

_georget_georget Member Posts: 4
edited 2006-11-03 in Dynamics AX
Hi all
I've successfully imported data from Excel into Axapta using Excel definition groups. However can these definition groups be used to update existing Axapta records (ie. We made a whole heap of changes to the description fields of our item inventory in excel and we want to update these changes to the same items in axapta).

Thanks for your help

George

Comments

  • MikerMiker Member Posts: 105
    Hi georget.
    I would recommend you to create job to transfer your data to Axapta.

    MikeR (Axapta developer)
    going to Europe
  • _georget_georget Member Posts: 4
    Hi Mike
    Under normal circumstances I would, however axapta aleady has sales order transactions on the items therefore I can't just recreate them. I need to find a way to transfer the changes that were made in excel into axapta. We have around about 4000 inventory items to import.

    George
  • MikerMiker Member Posts: 105
    OK georget.
    So, what are you intend to change?
    1 Item fields
    2 Dimension fields
    3 Or Invent Trans?
    MikeR (Axapta developer)
    going to Europe
  • _georget_georget Member Posts: 4
    Item Description, Item Price (Cost, Inventory, Sales), Colour, Item Group.
  • MikerMiker Member Posts: 105
    Hi.
    As far as I can see you only need to download some changes from Excel to Axapta
    May be this code will help you
    Define variables
    COM application, workBooks, workSheets, currentWorkSheet, cell;
    str fileName;
    At first you need to get access to the Excel
    fileName = WINApi::getOpenFileName(0, [("@SYS28576"+' (*.xls)'), '*.xls'],'', 'Open File whith data ');
    application = new COM('Excel.application');
    workBooks = application.workBooks();
    workBooks.open(fileName);
    workSheets = application.worksheets(); //Get access to the collection of worksheets
    currentWorkSheet = workSheets.item(1);// Get access to the workSheets
    Than you need to get access to the cell
    cell = COM::createFromVariant(cellsOnSheet.item(curRow, 1));
    cellValue = convertVariant2Str(cell.value());
    Next select ItemId from Invent Table and update ItemName, Item Price,
    Item Group and others
    But better create special class for this, so you must done a lot of Checks.
    going to Europe
Sign In or Register to comment.