def get(r): """Returns a Range for the given table column name, named range, or Excel address (ex. A1:B4). `get` guesses the active workbook, and begins its search on the active sheet. See also: xl.Workbook.get and xl.Workbook.range""" return Workbook.default_workbook().get(r)
def selected_range(): """Gets the currently selected range. The returned range filters hidden cells by default""" wb = Workbook.default_workbook() xlApp = wb.xlWorkbook.Application return Range(xlApp.Selection, with_hidden=False).normalize()
def view(x, name=None, to=None): # if it's an array, load into excel, return the range return Workbook.default_workbook().view(x, name, to)
def workbooks(): """Returns a list of open workbooks""" import xl._impl.com_utils return [Workbook(x) for x in xl._impl.com_utils.get_open_xlWorkbooks()]