Improved Pyhton-excel code