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
Forum Updated to NodeBB v4.3 + New Features

How to make or embed xls in pyqt based gui and

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 3 Posters 3.5k Views 1 Watching
  • 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 18 Mar 2020, 07:53 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 19 Mar 2020, 03:23 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
      J 1 Reply Last reply 19 Mar 2020, 12:00
      0
      • Q Qt Enthusiast
        19 Mar 2020, 03:23

        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
        J Offline
        J Offline
        JonB
        wrote on 19 Mar 2020, 12:00 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

        2/3

        19 Mar 2020, 03:23

        • Login

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