Exporting Animation to .x

I can export normal 3d models to .x but when i try and add animation to any 3d model and export it there is no animation. i even right clicked on the .x file and opened directx viewer and that dint have any animation so i dont think animation is exporting. how to i export animations it has to be .x