for r in range(data.shape[0]): for c in range(data.shape[1]): ws_1.write(r,c,data[r,c]) solution: for r in range(data.shape[0]): for c in range(data.shape[1]): ws_1.write(r,c,str(data[r,c]))