Write data to an excel worksheet in the specific format