1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

sql and xls

Discussion in 'MySQL' started by DomainMagnate, Mar 9, 2006.

  1. #1
    How difficult is it to transfer an excel file to a mysql database?

    Is there any easy scripts that can do it?

    thanks, Mike
     
    DomainMagnate, Mar 9, 2006 IP
  2. buronggoy

    buronggoy Peon

    Messages:
    204
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have a tool that implements this one.xls to mysql
    Navicat MySQL-very useful tools in transffering and converting database into different types.
    You can download it here navicat.com/..
    Hope this one help.Cheers!
     
    buronggoy, Mar 9, 2006 IP
  3. DomainMagnate

    DomainMagnate Prominent Member Premium Member

    Messages:
    10,870
    Likes Received:
    1,007
    Best Answers:
    0
    Trophy Points:
    395
    #3
    thanks so basicly you're saying if you have excel you can transfer it to mysql quickly and easily, with the same structure of course..?
     
    DomainMagnate, Mar 9, 2006 IP
  4. buronggoy

    buronggoy Peon

    Messages:
    204
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes..very useful software..
    If you have problems with the software you can ask for my help.
    Im not sure you will have problems with that.
    It's easy to use..you dont have to use PHPmyAdmin for this one.just enter the host username and password.
     
    buronggoy, Mar 9, 2006 IP
    DomainMagnate likes this.
  5. sketch

    sketch Active Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    68
    #5
    When I need to transfer XLS data into MySQL I simply export the XLS as a CSV file and import that into MySQL via phpMyAdmin :) Works great since phpMyAdmin natively supports CSV.
     
    sketch, Mar 10, 2006 IP
  6. buronggoy

    buronggoy Peon

    Messages:
    204
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Nice way of transferring your xls.But I think it is more complicated when you do this unlike using this user-friendly tools by navicat.
     
    buronggoy, Mar 11, 2006 IP
  7. sumit1987

    sumit1987 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i want to import a file which is in csv format i used phpmyadmin but some error is coming. Let me tell u wha t the error is
    "Invalid field count in CSV input on line 1."
    so can any1 plzzzzz help
     
    sumit1987, Nov 14, 2008 IP
  8. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Blarg ... $100 for this!11!?!?!?1 ... where's open source when you need it.

    Nice avatar!!!!

    That method works great for a simple csv but how about a full spreadsheet with tables? How about creating each table in the db on the fly?

    I can see many practical applications for this, mainly because excel is a much better visual tool than phpmyadmin ever could dream of being.

    1. build it in excel
    2. dump into mysql
    3. structure is transferred flawlessly (table names, column names, data format, etc)

    I know that excel can be read by some open source php programs (for example), so heading from xls directly to mysql isn't a far stretch ... but believe it or not, I couldn't find anything freely available.

    Now, in excel I know you can export to XML format. Doing this gives a file structure which would be easy to transfer to a sql format and dump in place. That's a couple hour script at most .. the xml is nicely formatted and looks like this

    In php I see 3 preg_match_all loops (1 for tables, 1 for each row, 1 for each field) and some creative array output ... < 100 lines total code.

    I don't need this at the moment, but it would have been terribly useful in the past. Many of my db driven sites could have been created in 1/2 the time with a tool of this nature.

    Sorry, but I don't have the time to whip this one up right now ... subscribing to this thread though hoping that someone else will pick up the slack. If not, someday I might find some time for it.
     
    ErectADirectory, Nov 15, 2008 IP
    malcolm1 likes this.
  9. sumit1987

    sumit1987 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    thanks for the help!!!!!
    now can u tell me how to search a record from the database and display all the field related to that search in text fields so that you can update information after clicking update.
     
    sumit1987, Nov 16, 2008 IP
  10. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You should look into CRUD activities for SQL/PHP. I could help but it would have to be for a charge.

    Asking this as a separate question over at the php section of DP will yield much better results ... but still, I don't think anyone is doing it for you.
     
    ErectADirectory, Nov 17, 2008 IP
  11. mygalaxy

    mygalaxy Active Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    Digital Goods:
    1
    #11
    I am actually surprised that you can't do it from excel, if you export it as a tab deliminated or comma deliminated I thought that may work. Maybe not, just a thought.
     
    mygalaxy, Nov 17, 2008 IP
  12. saqibkhan2311

    saqibkhan2311 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thanks for help, its indeed of great help for the people who really wanna master the excel
     
    saqibkhan2311, Jul 10, 2011 IP
  13. ansh1593

    ansh1593 Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    thanks for the info...:)
     
    ansh1593, Aug 31, 2011 IP
  14. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,883
    Likes Received:
    34
    Best Answers:
    51
    Trophy Points:
    100
    #14
    Rukbat, Sep 1, 2011 IP