Many fixes to Excel data code