fix export_xls when query returns empty list