Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

how to import data from excel to mysql using PHP

This is a discussion on how to import data from excel to mysql using PHP within the Programming forums, part of the Web Designing & Development category; Hello Friends, The simplest way to use Excel imports and exports with PHP is to use the PEAR Excel functions. ...

  1. #11
    Senior Member Array
    Join Date
    Jan 2011
    Location
    India
    Posts
    116

    Default Re: how to import data from excel to mysql using PHP

    Hello Friends,

    The simplest way to use Excel imports and exports with PHP is to use the PEAR Excel functions. I've just finished working on a project where I've had to export to Excel directly from PHP, and another developer produced the import script, and it's all pretty easy wen you use this.

    Thanks

  2. #12
    Junior Member Array
    Join Date
    Mar 2011
    Posts
    12

    Default Re: how to import data from excel to mysql using PHP

    The easiest way to use Excel in PHP import and export of Excel function using PEAR. I just finished working there I have to export to Excel directly from the PHP project, and the other development and production of the import script, it's all very easy to use this news.

  3. #13
    Member Array
    Join Date
    Mar 2011
    Posts
    62

    Default Re: how to import data from excel to mysql using PHP

    Hi,
    thanks a lot for sharing your knowledge with all.it is a very helpful tool.now I have got the overall idea about the procedure of import data from excel to mysql using PHP.I want to know about the procedure.I definitely use this tool.


  4. #14
    Junior Member Array
    Join Date
    Dec 2011
    Posts
    16

    Lightbulb Re: how to import data from excel to mysql using PHP

    the best way is to create a *csv file of your excel file and import it via php then yuo can use it as sql database.




    http://www.webyukti.com

  5. #15
    Senior Member Array
    Join Date
    Jul 2011
    Posts
    127

    Default Re: how to import data from excel to mysql using PHP

    Hey,

    Do check out this link http://blog.tjitjing.com/index.php/2...in-5-easy.html . I think it is really useful and shows easy to follow steps regarding the matter. Nonetheless, PEAR excel functions are pretty effective as well.
    Last edited by Jeniekrag; 12-13-2011 at 12:25 PM.

  6. #16
    Junior Member Array
    Join Date
    Feb 2012
    Posts
    1

    Default Re: how to import data from excel to mysql using PHP

    Hello Friends
    Try this code:
    <?php

    require_once 'Excel/reader.php';
    $data = new Spreadsheet_Excel_Reader();

    $data->read('Senator.xls');

    error_reporting(E_ALL ^ E_NOTICE);
    echo "<table border='1'>";
    echo "<tr><th>STT</th><th>First Name</th><th>Middle Name</th><th>Last Name</th><th>Email ID</th></tr>";

    for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++)
    {
    echo "<tr>";

    echo "<td>";
    echo $data->sheets[0]['cells'][$j+1][1];
    echo "</td>";
    echo "<td>";
    echo $data->sheets[0]['cells'][$j+1][2];
    echo "</td>";
    echo "<td>";
    echo $data->sheets[0]['cells'][$j+1][3];
    echo "</td>";

    echo "<td>";

    echo $data->sheets[0]['cells'][$j+1][4];
    echo "</td>";

    echo "<td>";

    echo $data->sheets[0]['cells'][$j+1][5];
    echo "</td>";
    //echo "<br>";

    echo "</tr>";

    }

    echo "</table>";

    ?>

  7. #17
    Member Array
    Join Date
    Jan 2012
    Posts
    61

    Default Re: how to import data from excel to mysql using PHP

    Quote Originally Posted by ExpertsGuide View Post
    Explore fgetcsv()

    php.net/manual/en/function.fgetcsv.php
    Thank you so much!!
    For more resource please check or Visit Photo Clipping, Clipping Images

  8. #18
    Banned Array
    Join Date
    Feb 2012
    Posts
    15

    Default Re: how to import data from excel to mysql using PHP

    really that code was helpful

  9. #19
    Banned Array
    Join Date
    Feb 2012
    Posts
    15

    Default Re: how to import data from excel to mysql using PHP

    import using pear



Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 09-07-2011, 09:20 AM
  2. Replies: 1
    Last Post: 09-06-2011, 04:41 PM
  3. [WTS] Over 30 mysql MySQL databases worth $6250 now just $3750
    By immediate in forum Website Content & Scripts For Sale
    Replies: 1
    Last Post: 01-22-2010, 03:10 PM
  4. [WTS] 32 Original MySQL Niche Content Databases On Sale (Industrial Data & Facts)
    By immediate in forum Website Content & Scripts For Sale
    Replies: 0
    Last Post: 12-23-2009, 01:57 AM

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
  •  
SEO Forum | Web Hosting Forum | Websites For Sale |