Results 1 to 17 of 17

Thread: My approach to export QTableView data to a Microsoft Excel file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2016
    Posts
    3
    Qt products
    Qt5

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    Hi All !
    i create success a project export to excel on window. but when i work on ubuntu not success. Help me please!

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    How does the export work? Does it use Qt's ActiveX interface to MS Excel COM? That does not work on any platform except Windows.

  3. #3
    Join Date
    Mar 2016
    Posts
    3
    Qt products
    Qt5

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    i created a project as example " TestTableView" of Venomj. it runs normal on Windows.but not runs on Ubuntu

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    Quote Originally Posted by thietnguu View Post
    i created a project as example " TestTableView" of Venomj. it runs normal on Windows.but not runs on Ubuntu
    That example uses ActiveX to remote control an Excel instance. Which, as d_stranz said, obviously only works when there is ActiveX and Excel on the system.
    Microsoft has not released either for Linux yet.

    Cheers,
    _

  5. #5
    Join Date
    Mar 2016
    Posts
    3
    Qt products
    Qt5

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    on ubuntu do you know how export to excell?

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    Depends on what you need.

    If you just have a table of values you could write a simple CSV file.
    Excel can import these.

    Cheers,
    _

  7. #7
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    Take a look at libXL. There are versions for C, C++ and other languages, and is portable to Windows, linux, Mac, and iOS. It does not require Excel, but can produce xls, xlsx, and xlsm formats that can be opened as workbooks in Excel.

    This a commercial library (it isn't free). You can download a demo version that has limited capability if you want to try it out.

    There might be open-source libraries available, but I haven't looked.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  8. #8
    Join Date
    Jan 2020
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    I'm sorry, but the compressed file attached to the body is empty. Can you upload the full contents of the compressed file or source code again?

  9. #9
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: My approach to export QTableView data to a Microsoft Excel file

    This is a 10 year old post, and the last time the OP posted anything to this forum was also 10 years ago. If the zip file is no longer accessible, then it is very unlikely it will be re-posted. The OP is long gone from this forum.

    Try searching using Google for Excel export libraries. You can also simply write the table out as a CSV file, which Excel or any other spreadsheet program can import.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 3
    Last Post: 1st February 2011, 11:57
  2. How to read Excel file with Qt
    By HelloDan in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2009, 20:27
  3. How to export data from QTableView to Ms Excell
    By joseph in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2009, 14:19
  4. How to copy from Excel and paste to QTableView
    By sms in forum Qt Programming
    Replies: 5
    Last Post: 7th February 2009, 03:58
  5. Replies: 3
    Last Post: 12th June 2008, 11:59

Tags for this Thread

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.