Important an Excel spreadsheet in to SQL database

Discussion in 'Programming' started by mnymkr, May 1, 2007.

  1. #1
    How might we import an excel spreadsheet into a sql database?
     
    mnymkr, May 1, 2007 IP
  2. void

    void Peon

    Messages:
    119
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'd save the Excel file as .csv and then import using something like phpMyAdmin.
     
    void, May 1, 2007 IP
  3. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #3
    ok what if i need for someone who does not have phpmyadmin access to do it
     
    mnymkr, May 1, 2007 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,839
    Likes Received:
    4,542
    Best Answers:
    123
    Trophy Points:
    665
    #4
    Create a script to read the csv file, parse it into an array and then create the insert statements.

    see http://www.php.net/fgetcsv
     
    sarahk, May 1, 2007 IP