fix thread bug and add excel
improve