How to make or embed xls in pyqt based gui and
-
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 -
In that case can we have
- QTableWIdget in th Pyqt GUI
- It should have the same functionality of Excel sheet
- For that if some one can help in code that will be helpful
-
In that case can we have
- QTableWIdget in th Pyqt GUI
- It should have the same functionality of Excel sheet
- For that if some one can help in code that will be helpful
@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....