[Python] Dynamically fill the entry in tkinter and xlwings

Discussão em 'Python' iniciado por Stack, Novembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I have an entry widget in my GUI to be dynamically filled with the cell range based on the cells have selected in the spreadsheet.

    For example, if I selected A1:F30 in a sheet, it will put the range A1:F30 in the entry widget. below is the portion my entry widget in the GUI

    Here is an example of selecting a range from a spreadsheet with in an inputbox that I was able to do. But I want to apply the same concept with a tkinter GUi

    wb = xw.books.active
    sheet = wb.sheets.active
    selectedRange = sheet.api.Application.InputBox(
    'Select your range:', Type=8)
    selectedRangeAdd = sheet.range(selectedRange.Address)

    Continue reading...

Compartilhe esta Página