how to check datatype in Excel file

I am writting a job to import data from Excel file into Axapta. But the problem is I can not check the data type of Excel cell in that job. So sometimes, can not reconize the double, long or string datatype in Excel. Is there any way to convert the datatype of Excel cell value? or check the type of that value? Khue Trinh

If you read cell value with *.*Value(row, col) You can check the value you read with method variantType() which returns COM Variant Type, you can then check that type and use proper method for given type, i.e. for decimal number you can use methods like float(), double(), etc.

Hi Khue, Is there any particular reason you are importing from Excel? Otherwise try to import from .TXT or .CSV file to avoid such complications. For simple import jobs, please refer to here to draw some inspiration - http://www.harishm.com/Navision/Code.html Regards, Harish Mohanbabu