Adds functionality for export button. pcbiggs