Exporting specific records to a file(excel or notepad) in AX 2012

Hi Friends

Please help me with this scenario…!

I have a form with the button in it. when i click the button, based on some enum value present in the form some records are selected(here check box is used for selecting the record) and the unchecked records are exported to another file(Excel or notepad).

Some suggestion will be of greater help…!