Saturday, January 12, 2013

AX XPO import error: 'Unknown export file format'

When someone attempted to import the file into the AOT, they received the error ‘Unknown export file format’ (Figure 1)
Check the first word in the XPO. The file has been manipulated somehow so that the first word is not 'ExportFile' or 'Documentation'. It needs to be one of these two but who knows what else is wrong in the file. You can try to fix it and try it again, but as long as you are able to grab a new XPO with the same content, that is the safest approach.
From the code below in the SysImportElements class' 'ExamineFile' method, we can see that the code is looking at the first word in the XPO file (Figure 3 line 14). If the first words in the XPO is not 'ExportFile' or 'Documentation', the condition on line 23 is hit which is our error.

Figure 1 - The error message

 Figure 2 - The XPO contents with the first word highlighted

Figure 3 - The code where the error is being thrown

No comments:

Post a Comment