Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Insert Excel OR CSV File into MySQL OR MSSQL Database

Insert Excel OR CSV File into MySQL OR MSSQL Database

Scheduled Pinned Locked Moved Database
databasemysqlsql-serverhelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jasonmp
    wrote on last edited by
    #1

    Hello, I have scoured the web, found MANY apps that let you do this, however I am in need of a free solution. I have product sheets in an xls file that need to be put in a database, and I cannot type a query to insert hundreds of thousands of items into a db manually. Is there any free, easy way to insert Excel OR CSV File into MySQL OR MSSQL Database? I appreciate any help at all, thank you! :)

    M S S 3 Replies Last reply
    0
    • J jasonmp

      Hello, I have scoured the web, found MANY apps that let you do this, however I am in need of a free solution. I have product sheets in an xls file that need to be put in a database, and I cannot type a query to insert hundreds of thousands of items into a db manually. Is there any free, easy way to insert Excel OR CSV File into MySQL OR MSSQL Database? I appreciate any help at all, thank you! :)

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      The main problem will be that Excel is unstructured data, if all your sheets are well formed and are all EXACTLY the same the you can write a program with 3 parts: Folder scan that identifies each xls file importer that reads each xls into a data table (either cell by cell or using Jet) DAL to write the data table to the database. Expecting a "free" tool to do this is a little much.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • J jasonmp

        Hello, I have scoured the web, found MANY apps that let you do this, however I am in need of a free solution. I have product sheets in an xls file that need to be put in a database, and I cannot type a query to insert hundreds of thousands of items into a db manually. Is there any free, easy way to insert Excel OR CSV File into MySQL OR MSSQL Database? I appreciate any help at all, thank you! :)

        S Offline
        S Offline
        SimulationofSai
        wrote on last edited by
        #3

        SSIS. It's free if you have SQL Server 5005 2005 Developer or above. You can do it in minutes if you have it. :) Edit: Fixed typo

        SG Aham Brahmasmi!

        1 Reply Last reply
        0
        • J jasonmp

          Hello, I have scoured the web, found MANY apps that let you do this, however I am in need of a free solution. I have product sheets in an xls file that need to be put in a database, and I cannot type a query to insert hundreds of thousands of items into a db manually. Is there any free, easy way to insert Excel OR CSV File into MySQL OR MSSQL Database? I appreciate any help at all, thank you! :)

          S Offline
          S Offline
          SQLMechanic
          wrote on last edited by
          #4

          For MYSQL I use the LOAD DATA SQL. LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name' [REPLACE | IGNORE] INTO TABLE tbl_name [CHARACTER SET charset_name] [{FIELDS | COLUMNS} [TERMINATED BY 'string'] [[OPTIONALLY] ENCLOSED BY 'char'] [ESCAPED BY 'char'] ] [LINES [STARTING BY 'string'] [TERMINATED BY 'string'] ] [IGNORE number LINES] [(col_name_or_user_var,...)] [SET col_name = expr,...] http://dev.mysql.com/doc/refman/5.1/en/load-data.html

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups