SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    load data from excel into MySQL table?

    I'm working on an installation of Coppermine Photo Gallery (1.4) that runs using a MySQL database. In this particular case, I have some 270 photos and an excel spreadsheet with information about each photo.

    I can't see any utility that's obvious to upload the data into the database. I've poked around in the interface to phpMyAdmin, and I can see where I can export, but I don't see an import.

    Searching doesn't seem to yield anything and I've posted on their board to no response.

    Am I missing something? Or am I going to need to manually re-enter all this data? I was thinking that this was a database and I would be able to easily get some data into it.

    Thanks for any guidance.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,338
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    there's a command called LOAD DATA INFILE which will accept csv files
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I routinely get sent for uploading records extracted from an offlline database into excel and put them into an online MySQL database. I save them as tab delimited text files using excel (I receive them as CSV files) , and that works very well, as there are many records with commas in them .
    here's the SQL command I used yesterday

    load data local infile "c:/Users/Dr John/Documents/logpile/FlightDataExport_2008-08-13.txt" into table myflights;

    I use SQL Manager 2007 Lite for MySQL, from EMS. Free download, installed on my PC, to do this.

  4. #4
    SitePoint Zealot Fiska's Avatar
    Join Date
    Jul 2004
    Location
    Dardania - Ancient Illyria
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how can you export data from excel as CVS ?
    let's make things easier

  5. #5
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fiska View Post
    how can you export data from excel as CVS ?
    File > Save As then select the file type required.

  6. #6
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dr. John and r937!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •