It is possible to make a system that when you press a button adds one more in excel

Asked

Viewed 23 times

-1

I am making a system in Python for a bakery at each sale the user clicks on the button and adds one in a certain cell in an excel spreadsheet, I wanted to know how does this system add another number in the spreadsheet just missing this because the system is ready.

Code of the sales system:

    if menuvendas.paoopt.isChecked():
        print("")
        #excel
        workbook = load_workbook(filename="Padaria.xlsx")
        sheet = workbook.active
        p = sheet["B2"]
        p = p +1
        workbook.save(filename="Padaria.xlsx")  ```

Tentei usar esse sistema mas não deu certo. Se algúem poder me ajudar.
  • Please clarify your problem or provide additional details in order to highlight exactly what you need. The way it’s written these days it’s hard to tell exactly what you’re asking.

  • Example: as if it were a counter every time you press the button increases a number in the Excel spreadsheet

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.