PDA

View Full Version : How to convert data in QTableWidget into an Excel file (URGENT)



New
15th December 2011, 17:02
Hi,
I am Working on an application where I have some data inserted in a QTableWidget on dailog window.
Now I want to add a pushbutton "Convert to Excel", which helps the user to convert the data in QTablewidget to an excel file(.xml or csv format)
Kindly help how can i achieve this in Qt3 version.
Its very urgent, can any one plz help..


Thanks!!

Lykurg
15th December 2011, 20:15
Hh, make to nested for loops over the rows and columns and save the data to an xml file? Where is the problem?

ChrisW67
15th December 2011, 22:57
If you can be sure Excel is present on the machine then you can also use:

ODBC to create an Execl spreadsheet directly: http://www.codeproject.com/KB/database/excel_odbc_write.aspx
OLE automation to create an Excel spreadsheet directly.