Moved the table to excel code into js file.