def create_dataset(self, in_stream):
assert XLSX_IMPORT<EOL>from io import BytesIO<EOL>xlsx_book = openpyxl.load_workbook(BytesIO(in_stream), read_only=True)<EOL>dataset = tablib.Dataset()<EOL>sheet = xlsx_book.active<EOL>rows = sheet.rows<EOL>dataset.headers = [cell.value for cell in next(rows)]<EOL>for row in rows:<EOL><INDENT>row_values = [cell.value for cell in row]<EOL>dataset.append(row_values)<EOL><DEDENT>return dataset<EOL>
Create dataset from first sheet.