PDA

View Full Version : Excel using Qt



nmn
27th July 2007, 08:39
Hi all,
I am new to Qt like the man !
how to read and write in excel file using Qt? How
the opensource do it ?and how's commercial?
I 'am no time on it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
can you give me an example!
The god bless you all!!!!
ningminna@126.com

jpn
27th July 2007, 19:50
What have you tried so far? Have you examined how do Excel formats look like?

whitefurrows
27th July 2007, 21:37
Hi,

you have many possibility, you can use QAxObject:


//Create connection, add workbook und sheet
QAxObject* excel = new QAxObject("Excel.Application", 0);
QAxObject* app = excel->querySubObject("Application()");
QAxObject* wbks = excel->querySubObject("Workbooks()");
QAxObject* wb = wbks->querySubObject("Add()");
QAxObject* ws = wb->querySubObject("Worksheets(int)", 1 );

//Show Excel
app->setProperty("Visible", true );

or generate a C++ namespace with the dumpcpp tool (http://doc.trolltech.com/qtopia4.2/activeqt-dumpcpp.html)



Excel::Application* app = new Excel::Application;
wbk = app->Workbooks()->Add();
app->SetVisible(true);

or take a look to QExcel Converter SQL (http://sourceforge.net/projects/qtexcel-xslt/)

but i think you can do all this things only with the commercial qt version

nmn
28th July 2007, 02:44
Hi,

you have many possibility, you can use QAxObject:


//Create connection, add workbook und sheet
QAxObject* excel = new QAxObject("Excel.Application", 0);
QAxObject* app = excel->querySubObject("Application()");
QAxObject* wbks = excel->querySubObject("Workbooks()");
QAxObject* wb = wbks->querySubObject("Add()");
QAxObject* ws = wb->querySubObject("Worksheets(int)", 1 );

//Show Excel
app->setProperty("Visible", true );

or generate a C++ namespace with the dumpcpp tool (http://doc.trolltech.com/qtopia4.2/activeqt-dumpcpp.html)



Excel::Application* app = new Excel::Application;
wbk = app->Workbooks()->Add();
app->SetVisible(true);

or take a look to QExcel Converter SQL (http://sourceforge.net/projects/qtexcel-xslt/)

but i think you can do all this things only with the commercial qt version



Dear sir :
I have see it .Thank you very much for your help.
How can I Read \Write Excel File !

With my best regards!