Results 1 to 4 of 4

Thread: Excel using Qt

  1. #1
    Join Date
    Nov 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Excel using Qt

    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

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Excel using Qt

    What have you tried so far? Have you examined how do Excel formats look like?
    J-P Nurmi

  3. #3
    Join Date
    May 2006
    Posts
    108
    Thanks
    35
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Excel using Qt

    Hi,

    you have many possibility, you can use QAxObject:

    Qt Code:
    1. //Create connection, add workbook und sheet
    2. QAxObject* excel = new QAxObject("Excel.Application", 0);
    3. QAxObject* app = excel->querySubObject("Application()");
    4. QAxObject* wbks = excel->querySubObject("Workbooks()");
    5. QAxObject* wb = wbks->querySubObject("Add()");
    6. QAxObject* ws = wb->querySubObject("Worksheets(int)", 1 );
    7.  
    8. //Show Excel
    9. app->setProperty("Visible", true );
    To copy to clipboard, switch view to plain text mode 

    or generate a C++ namespace with the dumpcpp tool

    Qt Code:
    1. Excel::Application* app = new Excel::Application;
    2. wbk = app->Workbooks()->Add();
    3. app->SetVisible(true);
    To copy to clipboard, switch view to plain text mode 

    or take a look to QExcel Converter SQL

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

  4. #4
    Join Date
    Nov 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Re: Excel using Qt

    Quote Originally Posted by whitefurrows View Post
    Hi,

    you have many possibility, you can use QAxObject:

    Qt Code:
    1. //Create connection, add workbook und sheet
    2. QAxObject* excel = new QAxObject("Excel.Application", 0);
    3. QAxObject* app = excel->querySubObject("Application()");
    4. QAxObject* wbks = excel->querySubObject("Workbooks()");
    5. QAxObject* wb = wbks->querySubObject("Add()");
    6. QAxObject* ws = wb->querySubObject("Worksheets(int)", 1 );
    7.  
    8. //Show Excel
    9. app->setProperty("Visible", true );
    To copy to clipboard, switch view to plain text mode 

    or generate a C++ namespace with the dumpcpp tool

    Qt Code:
    1. Excel::Application* app = new Excel::Application;
    2. wbk = app->Workbooks()->Add();
    3. app->SetVisible(true);
    To copy to clipboard, switch view to plain text mode 

    or take a look to QExcel Converter SQL

    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!

Similar Threads

  1. Read \Write Excel File using Qt
    By xingshaoyong in forum Qt Programming
    Replies: 4
    Last Post: 27th July 2007, 22:07
  2. Excel XML Creation with Qt's Dom classes
    By jpujolf in forum Qt Programming
    Replies: 4
    Last Post: 21st May 2007, 12:23
  3. Filtering as Excel in Table
    By ankurjain in forum Qt Programming
    Replies: 1
    Last Post: 13th May 2006, 09:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.