Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to make or embed xls in pyqt based gui and

How to make or embed xls in pyqt based gui and

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 3 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by Qt Enthusiast
    #1

    How to make or embed xls in pyqt based gui and user should cross link to other views in the GUis
    for example user should be able to take values from cells of Excels and create a heirarchy in QtreeView of pyqt based GUI

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Qt Enthusiast
      wrote on last edited by Qt Enthusiast
      #2

      In that case can we have

      1. QTableWIdget in th Pyqt GUI
      2. It should have the same functionality of Excel sheet
      3. For that if some one can help in code that will be helpful
      JonBJ 1 Reply Last reply
      0
      • Q Qt Enthusiast

        In that case can we have

        1. QTableWIdget in th Pyqt GUI
        2. It should have the same functionality of Excel sheet
        3. For that if some one can help in code that will be helpful
        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Qt-Enthusiast
        We chose openpyxl, https://openpyxl.readthedocs.io/en/stable/, as the best/easiest interface to Excel/LibreOffice Calc cross-platform. This lets you read/write XLS/XLSX files.

        However, you have to write your own UI code to e.g. display data in a table, and it won't evaluate formulae for you, it's a file reader/writer. So you won't just get "the same functionality of Excel sheet" out of the box, you have to write that part (quite a bit of work, depending on how much functionality you expect).

        To really get Excel you'd have to try something like QAxObject, e.g. https://forum.qt.io/topic/89536/qaxobject-and-excel or https://stackoverflow.com/questions/22609236/qt-qaxobject-add-excel-worksheet. Of course that is not "a QTableWIdget", it's full Excel running, and naturally you have to have Excel/Windows only....

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved