Options

How to import data from excel file to navision table

slavademslavadem Member Posts: 3
edited 2002-02-28 in Navision Financials
How to import data from excel file to navision table. Can you explain a simple code how to do it.

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Have a look at the topic "Tips&Tricks: Excel Automation" in the forum Navision Tips & Tricks. This will get you started. Be sure to select "Show all topics" first, otherwise a blank screen is displayed.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    John_TegelaarJohn_Tegelaar Member Posts: 159
    Or use Evaluate("Non-text Field",Format(Excel Value)) to convert the text from the Excel cell. Works for decimal, integer, boolean, etc.

    John
  • Options
    slavademslavadem Member Posts: 3
    It's ok! But some fields don't import because of error: "Can't convert data from text to boolean, or decimal"


    "Allow Invoice Disc.":=Format(xlWSheet.Range('M1').Offset(row,0).Value);

    "Unit Price":=Format(xlWSheet.Range('P1').Offset(row,0).Value);
  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Try this:

    "Allow Invoice Disc.":=Format(xlWSheet.Range('M1').Offset(row,0).Value) = 'Yes';

    That is if there is a 'Yes' in your Excel stating you want discount.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Sign In or Register to comment.