Bug fix in spreadsheet export