problem with importing data from Excel

resres Member Posts: 6
Hello

I use Navision 4.0, table 370 (Excel Buffer). Situation: there are cells in Excel(2003) with number format. If the value is 10^15 or greater then if I try to import it I get error in the line
"Cell Value as Text" := DELCHR(FORMAT(XlWorkSheet.Range(xlColID + xlRowID).Value),'<',' ');"
It seems that the FORMAT function can't handle the variant containing decimal value 10^15 or greater. When I preformat cells as text or put an apostrophe in front of the number in Excel then i get no problems but I doubt the users would like to start doing it.

I'd like to know if there is any other way to turn the variant value into text? I've run out of ideas ](*,)

Thanks in advance.

Comments

  • ara3nara3n Member Posts: 9,257
    There is an cell property called NumberFormat that you can set to "@". before grabing the value. There are other values that you can set for the function. Hope this helps.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.