Options

Decimal places problem in Excel Import

vyankuvyanku Member Posts: 791
I create a report to import data from excel file .
I had also write the code to check the quantity imported from excel should not be greater than available quantity.
In excel I entered quantity 85.42
But when it imports in navision it shows 85.42000002 and gives error because available quantity is 85.42.
Why it is not showing the exact quantity entered in Excel.
I write the code to get the value from excel,
EVALUATE(Quantity,COPYSTR(ExcelBuf."Cell Value as Text",1,20))
How can I get the exact value from excel without rounding?

Comments

  • Options
    aniket256aniket256 Member Posts: 1
    {
    I used Excel Buffer table
    Name DataType Subtype Length
    RecExcel Record Excel Buffer
    }
    //RecExcel.AddColumn(Value,IsFormula,CommentText,IsBold,IsItalics,IsUnderline,NumFormat);
    //For 5 Decimal places just change numFormat

    RecExcel.AddColumn("Amount To Customer",FALSE,'',FALSE,FALSE,FALSE,'0.00000');
    Aniket Sawant.
  • Options
    hery_halimhery_halim Member Posts: 53
    hi, i am very new in nav,
    and i encountered the same problem.
    when it imports items in navision it shows 30.0000001 instead of 30.

    i use VALIDATE("No.",ExcelBuf."Cell Value as Text");

    Why is this happen ?
    Any idea ?


    Thanks for the help.
Sign In or Register to comment.