fixed bug with mainlabel causing duplicate headers.

if mainlabel parameter was set to "Test", the first two columns in the
excel file would result in column headers like the following:

Test	Test#

This patch filters out the second column header Test#
Refactored the excel format for cleaner, more readable code.
Merge pull request #19 from netbrain/excel

fixed bug with mainlabel causing duplicate headers in excel format.