Remove main and finish implementation
Added the writeToExcel method