loading data into a table from excel spreadsheet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pindz

    loading data into a table from excel spreadsheet

    Hello,

    I have a excel spreadsheet from which I would like to load data into a
    table in mysql.
    Can you please give me an example of the above.

    Thanks in advance

    Nagsy
  • Bill Karwin

    #2
    Re: loading data into a table from excel spreadsheet

    Pindz wrote:[color=blue]
    > Hello,
    >
    > I have a excel spreadsheet from which I would like to load data into a
    > table in mysql.
    > Can you please give me an example of the above.[/color]

    I've been doing this recently in Perl by reading the spreadsheet with
    the Spreadsheet::Pa rseExcel module, and then connect to the database and
    insert records for each row in the spreadsheet, using DBD::mysql.

    You can also save the spreadsheet as a text file (under the "Save As..."
    menu, you can specify file type as CSV), and use MySQL's mysqlimport
    utility.


    Regards,
    Bill K.

    Comment

    • Scott

      #3
      Re: loading data into a table from excel spreadsheet

      nagra101@hotmai l.com (Pindz) wrote in message news:<a6dc7e26. 0409300513.6807 721a@posting.go ogle.com>...[color=blue]
      > Hello,
      >
      > I have a excel spreadsheet from which I would like to load data into a
      > table in mysql.
      > Can you please give me an example of the above.
      >
      > Thanks in advance
      >
      > Nagsy[/color]

      NAGSY:
      I'm only a novice, but this is how I do it, and it works well for me:

      1) Save the Excel spreadsheet (just the sheet, not the whole Excel
      workbook) as a tab delimited text file.

      2) Copy the text file

      3) Past it into a SQL window of MySQL Control Center & click on the
      exclamation mark

      The more knowledgable database experts on this board can probably tell
      you a better way, but in meantime, the above actually works.

      Comment

      Working...