How to read xls.-files in qt?



  • I've tried to get some numbers or text from excel file to widget on my qt application. I mean that when I click QPushButton, listWidget shows text which is in A1 box in the excel file.

    Could someone explain how to do this because I don't understand everything in doc.
    Tnx!


  • Moderators

    What are you using to read the Excel file? Is it a native .xls file with a library, or a .csv with a QFile, or what?



  • I think .xls file with a library.


  • Moderators

    I'm afraid that you haven't given a whole lot of information to work with. Which doc are you having trouble understanding?



  • I mean I'm so newbie with Qt that I don't know how to read docs and I'm not really good at English. Where I can learn "how to read them"?
    I tryied to use activeX object, but I don't really understand how.

    Sorry, that I'm so stupid and beginner.


  • Moderators

    It's ok. We've all been beginners. It's just a matter of figuring out what you need help with.

    Reading .xls files isn't a native Qt thing. As you mentioned it's more than likely done with an activeX control or a 3rd party library.

    Unfortunately, I haven't dealt with that before, so I don't have a good answer for you. Hopefully someone will have some experience with that and will be able to help you out more.



  • Apart from the options mentioned by mlong, you can also considder using ODBC. You can connect to an XML file as if it is a database. It really depends what your target is what the best way to aproach this is.



  • As already discussed in "this older thread":http://developer.qt.nokia.com/forums/viewthread/2144, there is no really good, out-of-the-box solution for this. You'll have to find your own workaround for that issue, sorry.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.