Fixed error in excel where end of file is reached.