implement write excel automatically