Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Writing to Excel using ODBC
Qt 6.11 is out! See what's new in the release blog

Writing to Excel using ODBC

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 482 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrShawn
    wrote on last edited by
    #1

    Hi guys I am trying to write to excel file using ODBC and QSql objects.

    I am at the point where I can connect and seem to be able to execute queries.

    The problem I have now that the file only exists during the lifetime of the program. Once I close the DB connection it goes away, unless the file is already created. Is there a way to get around this issue without bringing in some other library to generate the file?

    If the answer is no - what method / library is suggested. I do not want to export to a .csv. Id rather it be a .xls or xlsx.

    Thanks :)

    Shawn

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, to make the file persist, couldn't you just issue a SaveAs() before closing the DB connection?

      1 Reply Last reply
      4

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved