Results 1 to 4 of 4
  1. #1

    Comma / Tab Delimited >> MySQL

    Hello WHT-ers

    We currently use some proprietary software for our store inventory ( not exactly hosting related but this is my favorite forum and favorite group of knowledgeable techies so I figure why NOT? ) and sales.

    When doing mailing lists we used to do the microsoft excel to word address label templates to printer. I am working on building ( unless you all have other recommendations ) something that can use MySQL databases to print labels. This way, we can export our latest client addresses from our software to .xls and then import to the database as a cron nightly for the latest listings.

    Does anyone have experience with importing comma delimited or tab delimited files or spreadsheets into mysql tables? I have zero.

  2. #2
    Join Date
    Feb 2006
    Location
    Kusadasi, Turkey
    Posts
    3,273
    I don't have experience on xls file format, but if you can provide a simple text file format with comma or tab delimited entries, I can write a PHP script to store them into a database.
    Fraud Record - Stop Fraud Clients, Report Abusive Customers.
    █ Combine your efforts to fight misbehaving clients.

    HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
    █ Large and awesome portfolio, just visit and see!

  3. #3
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    958
    Two options, both fairly simple.

    a) Use phpMyAdmin and their 'GUI' for importing. Fairly self explanatory.

    b) Use the mysql cli and refer to the 'LOAD DATA INFILE' directive. Reference is here: http://dev.mysql.com/doc/refman/5.1/en/load-data.html

  4. #4
    Join Date
    Mar 2007
    Location
    Dublin
    Posts
    17
    Quote Originally Posted by Calibur747 View Post
    Does anyone have experience with importing comma delimited or tab delimited files or spreadsheets into mysql tables? I have zero.
    Hello!

    Yup, it's pretty easy.There's a number of ways of doing it, but if your data is pretty consistent and doesn't need to be transformed at all, you can just use mysqlimport. Ref:

    http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html

    There's a bunch of helper tools that will allow this as well, including phpMyAdmin.

    Phil.

Posting Permissions

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