The only export option in SONAR for MIDI data is a MIDI file. The file may be created using the Save functions or dragging clips out of the project. It is not clear what format the OP wants.
Here is a site with utilities to convert MIDI files to csv files and back. I just
downloaded (this is a direct link to the download windows zip file, check out the previous link to see the actual site) and tested MIDIcsv.exe and it seems to work on 64bit Win10.