Improved export to excel