Results 1 to 8 of 8

Thread: ActiveQt + Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Posts
    19
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default ActiveQt + Excel

    I'm trying to convert Excel file to DBF. So i'm using ActiveQt FrameWork.
    So i generated Excel namespace by using dumpcpp tool.
    First of all i wanted to get list of the Worksheets.
    The application is getting access violation in the row #10:
    QString sheetname = sheet->Name();
    I think the problem is that i incorrectly get the Excel::Worksheet object.

    Does anybody know how to solve this problem?

    The source code is shown below
    Qt Code:
    1. Excel::Application* excel = new Excel::Application;
    2. Excel::Workbooks* wbks = excel->Workbooks();
    3. Excel::Workbook* wbk = wbks->Open(exchange->getFilename());
    4. Excel::Sheets* sheets = wbk->Worksheets();
    5. int count = sheets->Count();
    6. QStringList sheetsList;
    7. for (int i=1; i<=count; i++)
    8. {
    9. Excel::Worksheet* sheet = (Excel::Worksheet*) sheets->Item(i);
    10. QString sheetname = sheet->Name();
    11. sheetsList.append(sheetname);
    12. }
    13. wbk->Close();
    14. excel->Quit();
    To copy to clipboard, switch view to plain text mode 

    Thanks.
    Last edited by nile.one; 18th September 2007 at 06:17.

Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 19:43
  2. How can I Read Write Excel File
    By xingshaoyong in forum Qt Programming
    Replies: 6
    Last Post: 13th July 2011, 20:16
  3. Read excel
    By psipsi in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 17:07
  4. Excel XML Creation with Qt's Dom classes
    By jpujolf in forum Qt Programming
    Replies: 4
    Last Post: 21st May 2007, 12:23
  5. 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.