def import_from_xls(<EOL>filename_or_fobj,<EOL>sheet_name=None,<EOL>sheet_index=<NUM_LIT:0>,<EOL>start_row=None,<EOL>start_column=None,<EOL>end_row=None,<EOL>end_column=None,<EOL>*args,<EOL>**kwargs<EOL>):
source = Source.from_file(filename_or_fobj, mode="<STR_LIT:rb>", plugin_name="<STR_LIT>")<EOL>source.fobj.close()<EOL>book = xlrd.open_workbook(<EOL>source.uri, formatting_info=True, logfile=open(os.devnull, mode="<STR_LIT:w>")<EOL>)<EOL>if sheet_name is not None:<EOL><INDENT>sheet = book.sheet_by_name(sheet_name)<EOL><DEDENT>else:<EOL><INDENT>sheet = book.sheet_by_index(sheet_index)<EOL><DEDENT>min_row, min_column = get_table_start(sheet)<EOL>max_row, max_column = sheet.nrows - <NUM_LIT:1>, sheet.ncols - <NUM_LIT:1><EOL>start_row = max(start_row if start_row is not None else min_row, min_row)<EOL>end_row = min(end_row if end_row is not None else max_row, max_row)<EOL>start_column = max(<EOL>start_column if start_column is not None else min_column, min_column<EOL>)<EOL>end_column = min(end_column if end_column is not None else max_column, max_column)<EOL>table_rows = [<EOL>[<EOL>cell_value(sheet, row_index, column_index)<EOL>for column_index in range(start_column, end_column + <NUM_LIT:1>)<EOL>]<EOL>for row_index in range(start_row, end_row + <NUM_LIT:1>)<EOL>]<EOL>meta = {"<STR_LIT>": "<STR_LIT>", "<STR_LIT:source>": source, "<STR_LIT:name>": sheet.name}<EOL>return create_table(table_rows, meta=meta, *args, **kwargs)<EOL>
Return a rows.Table created from imported XLS file.