Discuss Anything: Import From Excel File Into Mysql Database - Discuss Anything

Jump to content


Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Page 1 of 1

Import From Excel File Into Mysql Database Rate Topic: -----

#1 User is offline   csmith 

  • Newbie [Level 1]
  • Pip
  • Group: Kontributors
  • Posts: 11
  • Joined: 25-September 05
  • Current Mood: Current Mood:

Posted 25 September 2005 - 06:05 AM

Has anyone tried using the excel import function that comes with phpmyadmin http://www.phpmyadmin.net/home_page/ - it does not require any additional plug-ins or scripts and is fairly straightforward to use. In phpmyadmin, if you click on the database table which you wish to import the data to , there is a link on the bottom left corner which says "insert data from a text file into the table" - although it says text file it still can be used to import an excel file. When you click on this link you will be taken to a page where you will be asked for the file name (the excel file should be saved as a csv file), how the fields in the file are terminated (you would change this to a "," without the quotation marks), and other data formatting attributes (these are usually left blank). I have never found any problem when using this
0


Page 1 of 1

Other Replies To This Topic

#2 User is offline   FLaKes 

  • Trap Grand Marshal Member
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 1,142
  • Joined: 19-May 05
  • Gender:Male
  • Location:Mexico
  • Interests:Music, Animations, Graphics, almost everything that has to do with computers.
  • myCENT:NEGATIVE[-36.23]
  • Current Mood: Current Mood: None Chosen

Posted 25 September 2005 - 06:14 AM

Cool, I just wish you coulve posted this like a couple of months ago. A friend who is a programmer had to make a little php program that would import a huge excel file into phpmyadmin. He first exported the excel as text and then run it through his program and everything was loaded into phpmyadmin. This method wouldve saved us a lot of time.
0

#3 User is offline   vitrus 

  • Newbie [Level 3]
  • PipPipPip
  • Group: Kontributors
  • Posts: 42
  • Joined: 08-October 05
  • Location:Haarlem, The Netherlands
  • Interests:Ice-skating and nightskates,<br />Dancing, <br />webdevelopment (java, JSP and PHP)
  • Current Mood: Current Mood:

Posted 08 October 2005 - 02:47 PM

Hmmzzz I wil start working with that soon.
I once started a website that was using excell as a database (only to view not to change) ..

So all people in one company could look at the same data via intranet (php)...
0

#4 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 11 April 2008 - 05:52 PM

Import From Excel File Into Mysql Database using Java
Import From Excel File Into Mysql Database

I have to create a java desktop application that upload/loads the data from the MS Excel file (which is also on the desktop) into the specified table in a MySQL DB..
0

#5 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 16 April 2008 - 01:12 PM

So is it possible to transfer a database on MYSQL to another one using this method?

Regrads
Visual basic guide
Http://www.Visualbasicguide.Com

-question by Edison
0

#6 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 28 April 2008 - 01:08 AM

how to import excel file to the database in php
Import From Excel File Into Mysql Database

Hi every body,,does any body can help me?in regards in importing an excel file to the data base in php language.Atually am building on it but theres nothing was there in my database

-reply by jai2
0

#7 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 09 June 2008 - 09:37 AM

how to upload csv file and make store data in batabase
Import From Excel File Into Mysql Database

Hai I want to Upload an CSV file and make store data in DB...

-question by Upendar
0

#8 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 01 July 2008 - 06:04 AM

Where's the "insert data from a text file into the table" ?
I can't even find it..

-reply by Piper
0

#9 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 25 August 2008 - 08:53 AM

How we can import an excel file into MYSQL database.
Import From Excel File Into Mysql Database

Please send me a correct PHP code to import an excel file into MYSQL databse.

Thanks.

-question by Jitendra Kumar
0

#10 User is offline   CyrusX 

  • Newbie [Level 2]
  • PipPip
  • Group: Kontributors
  • Posts: 31
  • Joined: 19-August 08
  • Current Mood: Current Mood: None Chosen

Posted 04 September 2008 - 03:35 AM

Hi,

I'm wrestling with the same issue for some time. We want to import our XLS files if possible to a MYSQL database and make them search-able. By the way I had another question that someone here may know the answer and that is how to invert this XLS file into TXT format to import it to MYSQL anyway?


Thank you for your help.
0

#11 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 09 September 2008 - 04:23 AM

Import From Excel File Into Mysql Database
Import From Excel File Into Mysql Database

How to import excel data into MySQL database using PHP script? Do anyone know about it? could you help?

-reply by Jenny
0

#12 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 10 September 2008 - 10:41 AM

How we can import entries from database into excel sheet.
Import From database Into excel sheet

Please send me a correct PHP code to import entries of database into excel sheet.

Thanks in advance.

-question by Sunil Kumar

---- admin reply ------

Please use a tool called PHPmyADMIN to export into EXCEL directly

OR

EXPORT into CSV format.
0

#13 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 07 December 2008 - 12:36 AM

phpmyadmin Import From Excel File Into Mysql DatabaseCan it be accesses or launched via php code or API call? Is it open source? Please advise.-reply by Robert
0

#14 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 04 August 2009 - 10:03 PM

THANKS!Import From Excel File Into Mysql DatabaseIt's 4 years later, but just wanted to add my thanks. I'm struggling to learn all this stuff and spend hours searching the net for answers to my php / mysql / etc. Questions. Thought I'd need to download special software or write some fancy php code - NO! - your solution was a piece of cake!! More people should write-up their easy solutions and get them out for others to see. Thanks again.-reply by David
0

#15 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 17 November 2009 - 09:29 AM

import excel file to database in phpImport From Excel File Into Mysql Database

<?php  $data = array();    function add_person( $first, $middle, $last, $email )  {  global $data;    $data []= array(  'first' => $first,  'middle' => $middle,  'last' => $last,  'email' => $email   );  }    if ( $_FILES['file']['tmp_name'] )  {  $dom = DOMDocument::load( $_FILES['file']['tmp_name'] );  $rows = $dom->getElementsByTagName( 'Row' );  $first_row = true;  foreach ($rows as $row)  {  if ( !$first_row )  {  $first = "";  $middle = "";  $last = "";  $email = "";    $index = 1;  $cells = $row->getElementsByTagName( 'Cell' );  foreach( $cells as $cell )  {   $ind = $cell->getAttribute( 'Index' );  if ( $ind != null ) $index = $ind;    if ( $index == 1 ) $first = $cell->nodeValue;  if ( $index == 2 ) $middle = $cell->nodeValue;  if ( $index == 3 ) $last = $cell->nodeValue;  if ( $index == 4 ) $email = $cell->nodeValue;    $index += 1;  }  add_person( $first, $middle, $last, $email );  }  $first_row = false;  }  }  $username = "root";  $password = '';  $hostname = "localhost";  $con = mysql_connect($hostname,$username,$password)  or die("Unable to connect to MySQL");  mysql_select_db("sample",$con);  mysql_error();  foreach($data as $row)  {   mysql_query("insert into names values('','$row[first]','$row[middle]','$row[last]','$row[email]')");  }  ?>

 

<html>   <head>     </head>   <body>   <form action='import.Php' method='post' name='names' enctype='multipart/form-data'>   <table>   <tr>   <td>Upload file :</td>   <td><input type='file' name='file'></td>   </tr>   <tr>   <td></td>   <td><input type='submit' value='upload'></td>   </tr>   </table>   </form>   </body></html>

-reply by kuppa pavan

 


0

#16 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 02 December 2009 - 03:16 PM

I gett he following error with this script...Import From Excel File Into Mysql Database

Fatal error: Call to a member function getelementsbytagname() on a non-object

I get the above error with this script.  I have not changed anything in the script and my excel file has four columns with no headers in the first row.  Can anyone help?!?

-reply by Nicholas

 


0

Share this topic:


Page 1 of 1


Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info
*Hot Topic (New) Icon How To Execute sql file to create table General Talk Guest_portalku_* 
  • 18 Replies
  • 5,501 Views
New Replies Icon Email/file Encryption
nothing to hide?
Science & Technology brainless 
  • 3 Replies
  • 808 Views
New Replies Icon Freeware Program For Displaying Mysql Data Database mrdee 
  • 4 Replies
  • 473 Views
*New Replies Icon Phpnuke Themes Database General Talk Guest_tybby_* 
  • 2 Replies
  • 815 Views
New Replies Icon Mysql Host Adress
how do i connect
Web Design epox 
  • 4 Replies
  • 2,134 Views
New Replies Icon Adding Users To Databases Using Phpmyadmin PHP Programming Amezis 
  • 3 Replies
  • 7,147 Views
New Replies Icon Writing To Database Problem With Mysql - Not Writing Forum Post PHP Programming beeseven 
  • 3 Replies
  • 1,804 Views
New Replies Icon File Hosting!
hope it is useful..
Website Discussion webbug 
  • 11 Replies
  • 1,904 Views
New Replies Icon Bash - Reading File Line-by-line Problem? Others Inspiron 
  • 2 Replies
  • 441 Views
New Replies Icon Mysql Authentication Problems PHP Programming mwbouwkamp 
  • 13 Replies
  • 1,734 Views
New Replies Icon Excellent Pdf Tools
a free PDF to Word Converter
Software StvenWesley 
  • 2 Replies
  • 264 Views
*New Replies Icon What is file()? General Talk Guest_ssfei81_* 
  • 3 Replies
  • 941 Views
New Replies Icon A Great Tip To Find O'reilly Ebooks
insert this- inurl:OReilly filetype:chm
Misc Lyon 
  • 1 Reply
  • 2,486 Views
New Replies Icon flatfile guestbook for wap sites PHP Programming jailbox 
  • 3 Replies
  • 9,622 Views
*New Replies Icon Pagination - making data from mysql list on multiple pages General Talk Guest_welbis_* 
  • 2 Replies
  • 1,388 Views
New Replies Icon Imagefilez.com Server Upgraded Website Discussion ImageFilez.com 
  • 3 Replies
  • 3,736 Views
New Replies Icon Mysql Database nummell 
  • 7 Replies
  • 1,449 Views
New Replies Icon Adobe Acrobat File Password Software SamiFX 
  • 1 Reply
  • 1,049 Views
*New Replies Icon what happened to our profiles and user names General Talk Guest_thcinaus_* 
  • 4 Replies
  • 2,154 Views
Hot Topic (New) Icon 9000+ Logos. Excellent Collection. * * * * *
Download while you still can!
Freebie Stuff Lyon2 
  • 28 Replies
  • 5,004 Views

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Google Fan :-) We Recommend Firefox.     Customize / Settings Connect Us on facebook