Implement interactive tab export

Based on original version by Richard Coates