added codes to write Excel and debugged one error in UNESCO function