Excel automation optimization