3

I'm writing a python(3) program that will run on windows only. The program should have a GUI that contains, in part of its window, an embedded excel workbook (and not just its data). Is there a way of doing so with wxPython/PyQt/other?
If not, I found a way of doing that in c#, so I thought of writing the GUI in c# and connect it to python with COM. Can I use IronPython to make a simpler connection? What are the pros and cons of using COM vs using IronPython?
Thanks in advance

1 Answer 1

1

One way would be to embed a web browser (QWebView) into the gui and then point it to your Excel Services. The primary issue here, and there are quite a few, is that you'll still need to use something like xlwt to manipulate the data. Unless you have a complex workbook (with macros etc) it might actually be easier to just do something like this using xlwt and xlrd:

value_1 = str(sheet.cell_value(sel,4))
self.lineEdit.setText(value_1)

You can use labels to add column and row names, lineEdits for values, and tabs for sheets. With a little ctrl+v action (or perhaps a "for I in foo") this wouldn't take as long as you might think.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.