As importing and exporting data will most likely be something that you will have to do more than once, it would be nice to have your own little module that you can use every time, one that you feel comfortable using and expanding each time as you find new ways of using it.
I know that the standard import/export tool in AX also lets you do many of these things, but you are a programmer, right? So you probably prefer to write the code yourself.
Anyway, I just wanted to get you started with a simple example that shows how you can have a simple dialog where the user can select what to import/export, the filename, and so on.
The following is the class model diagram of the example:
This is the dialog class that ...