PDA

View Full Version : How to export data in tableview to an excel file?



drunknight
19th December 2013, 03:11
Hello,there!
Now I am doing a project in which a QTableView is used to display the parsed data,and we have already finished this part.Then we want to export the data in table into an excel file.We use "QAxObject("Excel.Application", parent)" to call the excel application in a new thread,but the code just doesn't work.We could not figure out why.Could anyone here help us with this problem,please? I would add the code here if you need.:confused:

ChrisW67
19th December 2013, 09:34
We use "QAxObject("Excel.Application", parent)" to call the excel application in a new thread,but the code just doesn't work.
There is almost certainly no need for a thread and almost no information that would help us help you.

What does "doesn't work" mean?
What did you see and what did you expect?
What have you done to diagnose the problem?
What error messages or return codes do you have?

drunknight
31st December 2013, 03:39
Doesn't work means that the UI was stuck when I started exporting.Firstly we thought that maybe we used the thread in the wrong way,and now we consider that Qthread and "QAxObject("Excel.Application", parent)" are not compatible.Then we change our strategy by using ODBC. Fortunately it works!
Thank you all the same!: )