예제 #1
0
파일: tools.py 프로젝트: xNUTs/PTVS
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)
예제 #2
0
파일: tools.py 프로젝트: xNUTs/PTVS
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()
예제 #3
0
파일: tools.py 프로젝트: xNUTs/PTVS
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)
예제 #4
0
파일: tools.py 프로젝트: xNUTs/PTVS
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()]
예제 #5
0
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() 
예제 #6
0
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)
예제 #7
0
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)