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. Import data from excel file to sqlite database using Qt C++
Forum Update on Monday, May 27th 2025

Import data from excel file to sqlite database using Qt C++

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 590 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.
  • S Offline
    S Offline
    Sini
    wrote on 23 Nov 2021, 12:26 last edited by
    #1

    Hello,
    I have an excel file in my local storage which is of almost 2 MB. I want to create a relational database and want to import the data from the excel file to the database using C++.Is there any way to do this??Can anyone help me with this?

    J V 2 Replies Last reply 23 Nov 2021, 13:02
    0
    • S Sini
      23 Nov 2021, 12:26

      Hello,
      I have an excel file in my local storage which is of almost 2 MB. I want to create a relational database and want to import the data from the excel file to the database using C++.Is there any way to do this??Can anyone help me with this?

      J Offline
      J Offline
      JonB
      wrote on 23 Nov 2021, 13:02 last edited by
      #2

      @Sini
      You need to start by knowing what the data in the Excel file and how you want to map it to a relational database. Or do you just mean every line in the Excel file is to map to a row in a single table in the database?

      S 1 Reply Last reply 23 Nov 2021, 13:18
      0
      • S Sini
        23 Nov 2021, 12:26

        Hello,
        I have an excel file in my local storage which is of almost 2 MB. I want to create a relational database and want to import the data from the excel file to the database using C++.Is there any way to do this??Can anyone help me with this?

        V Offline
        V Offline
        VRonin
        wrote on 23 Nov 2021, 13:08 last edited by
        #3

        @Sini said in Import data from excel file to sqlite database using Qt C++:

        want to import the data from the excel file to the database using C++

        If it's a one-of then I'd advise against it. It's much easier and faster to just use excel to build your query strings and dump them in an editor.
        If it's a recurring thing then you can read excel files using one of the methods listed here and just use the QtSql module to get them into SQLITE

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        1
        • J JonB
          23 Nov 2021, 13:02

          @Sini
          You need to start by knowing what the data in the Excel file and how you want to map it to a relational database. Or do you just mean every line in the Excel file is to map to a row in a single table in the database?

          S Offline
          S Offline
          Sini
          wrote on 23 Nov 2021, 13:18 last edited by
          #4

          @JonB The file includes CAN signals and it has more than 60 columns and almost 5000 rows. I want to make multiple tables (two to three ) with foreign key reference since the file has many signal datas for a single id.

          J 1 Reply Last reply 23 Nov 2021, 13:24
          0
          • S Sini
            23 Nov 2021, 13:18

            @JonB The file includes CAN signals and it has more than 60 columns and almost 5000 rows. I want to make multiple tables (two to three ) with foreign key reference since the file has many signal datas for a single id.

            J Offline
            J Offline
            JonB
            wrote on 23 Nov 2021, 13:24 last edited by
            #5

            @Sini
            So I don't know what to say other than you'll need to write code to read/parse it and create tables, relationships and rows as required.

            1 Reply Last reply
            3

            1/5

            23 Nov 2021, 12:26

            • Login

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