+ Reply to Thread
Results 1 to 9 of 9

Thread: Excel to DB

  1. Join Date
    Feb 2006
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel to DB

    I wondered if there was a way to export an Excel spreadsheet directly into a MySQL DB?

    I would rather export it automatically rather than update it manually via my CMS.

  2. Join Date
    Jan 2009
    Posts
    25
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Excel to DB

    I'm pretty sure if you get the Excel spreadsheet and convert it to CSV format you can then import one of the csv columns into an SQL column within a table.

  3. Join Date
    Feb 2006
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

  4. Join Date
    May 2008
    Posts
    29
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Excel to DB

    There are loads of ways of doing this. I havent ever done it myself but can remember researching for a project I have yet to start and it is possible.

    I just done a quick Google and there are a few pre-written php classes that you could use.

  5. Join Date
    Nov 2004
    Location
    England
    Posts
    2,291
    Thanks
    40
    Thanked 138 Times in 122 Posts

    Re: Excel to DB

    Quote Originally Posted by tomraffe View Post
    I wondered if there was a way to export an Excel spreadsheet directly into a MySQL DB?

    I would rather export it automatically rather than update it manually via my CMS.
    I know that MySQL management software navicat.com can import a .xls file into a MySQL database.

    However, where you meaning you wanted to do this totally automatically through .php code?

    Rgds

  6. Join Date
    May 2008
    Location
    Newcastle Upon Tyne
    Posts
    139
    Thanks
    0
    Thanked 16 Times in 15 Posts

    Re: Excel to DB

    Hi tomraffe,

    buy.at have created a feed processing guide document, which can be found here:

    http://files.perfiliate.com/solution...GuideFeb09.pdf

    The example is for an XML feed, however can be easily used for a CSV/PSV/TSV Excel file format.

    Here are some examples of getting a CSV file and then using the mysql query Insert or Update to get the data into your database:

    PHP: fgetcsv - Manual
    PHP MySQL Insert Into

    If you need any help with this please contact myself Reza.Badel@platform-a.com or our Data Quality Manager Simon.Quick@platform-a.com.

    Enjoy your weekend

    Reza
    Solutions Engineer
    buy.at

  7. Join Date
    Feb 2006
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel to DB

    Thanks all, Navicat worked well.

  8. Join Date
    Oct 2004
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel to DB

    Also I have used in the pass Excel to MySql converter programs I have found from google

  9. Join Date
    Oct 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel to DB

    Before you start - backup your database in your Admin,Tools,Database Backup or from phpmyadmin.


    In phpmyadmin choose your table
    click BROWSE
    scroll to the bottom of the page and hit EXPORT
    choose CSV for MS Excel
    choose from Excel edition: Windows (if on a PC)
    click zipped
    click GO and save you file to your PC, then unzip and alter in Excel.

    When finished altering - Save as csv (comma delimited)

    IMPORT CSV
    To IMPORT your list of products (or whatever) in phpmyadmin



    Go to phpmyadmin and choose your products table
    click BROWSE
    click SQL tab

    Under the 'Run SQL query window' you will see a box marked

    Or Location of the textfile:
    Location of the textfile:


    Underneath you will see some text that says...
    "Insert data from a textfile into table"

    Click it, you will see this....

    Location of the textfile
    CHOOSE YOUR CSV FILE YOU SAVED FROM EXCEL AS COMMA DELIMITED

    Fields terminated by
    CHANGE THIS FIELD TERMINATOR TO A COMMA , HENCE THE CSV (Comma Delimited File)

    ...DATA LOCAL
    Keep this to DATA LOCAL

    SUBMIT

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Excel
    By Bod in forum Affiliate Marketing Lounge
    Replies: 1
    Last Post: 27-04-05, 08:11 AM
  2. Excel Airways
    By KevinEdwards in forum DGM Affiliates
    Replies: 0
    Last Post: 26-01-05, 04:27 PM
  3. Excel help
    By Graham@Buyagift in forum Programming
    Replies: 2
    Last Post: 24-08-04, 03:36 PM
  4. Excel help
    By Wardy in forum Programming
    Replies: 2
    Last Post: 31-10-03, 01:26 PM

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

Content Relevant URLs by vBSEO 3.5.0 RC1 PL1