Hi,
I have created a table which contains a field with code data type.Then I wrote code to import data from excel to NAV table.The data is imported ,but not properly.The data is imported by calling the function ReadSheet() in the Excel Buffer table.
Ex.
The excel value is 20000000.But when it is imported to table, the value is changed to 20,000,000. How can I correct that :?:
If I change the format of Excel column to text and press F2 in the cells, then the data will be imported properly. Can I do it from navision using C/SIDE :?:
0
Comments
the 2nd solution is to do an EVALUTE of the imported value from Excel into NAV, and try to evalute the value to a decimal value. then if it is successful, you can format it as text, and remove commas. if you do not evaluate the value, and just remove commas, you may end up removing commas for fields that you intend to import commas from.
I tried the second solution , but the other issue is if the excel value is 0000094 then the imported value will be 94. How can I solve it ?
Plz find a solution :-k
EVALUATE(CodeVar, '0000094 ');
MESSAGE(CodeVar);
will message you 0000094.
so it will solve the trouble with second solution, but utility depends on what you want to do/achieve with that data.