Importing data from Excel into PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michal Maciejczak

    Importing data from Excel into PHP

    Is it possible to import data from excel file into php and than put it in
    mysql database?


  • charliefortune

    #2
    Re: Importing data from Excel into PHP

    my brother imports excel sheets straight into mysql - would that be of
    use to you ?

    Comment

    • Michal Maciejczak

      #3
      Re: Importing data from Excel into PHP

      I ment only data from excel sheets, from fields A1,A2,B1,B2 etc. then I
      could sort this data out and put them nicely into mysgl database
      [color=blue]
      > my brother imports excel sheets straight into mysql - would that be of
      > use to you ?
      >[/color]


      Comment

      • Justin Koivisto

        #4
        Re: Importing data from Excel into PHP

        Michal Maciejczak wrote:[color=blue]
        > I ment only data from excel sheets, from fields A1,A2,B1,B2 etc. then I
        > could sort this data out and put them nicely into mysgl database[/color]

        sounds like a job for the COM functions:



        --
        Justin Koivisto, ZCE - justin@koivi.co m

        Comment

        • Frank [GOD]

          #5
          Re: Importing data from Excel into PHP

          Save the data you want imported as CSV... then use mysqlimport from the
          command line or in your PHP code!!
          Another problem solved by GOD...

          Frank


          Michal Maciejczak wrote:[color=blue]
          > Is it possible to import data from excel file into php and than put it in
          > mysql database?
          >
          >[/color]

          Comment

          • G0ng

            #6
            Re: Importing data from Excel into PHP

            Frank [GOD] wrote:[color=blue]
            > Save the data you want imported as CSV... then use mysqlimport from the
            > command line or in your PHP code!!
            > Another problem solved by GOD...
            >
            > Frank
            >[/color]


            I'm using this in my website with no problem. I think it's the best (or
            only?) solution cause you can also manipulate the data....

            e.g $fp is the csv file

            $tmp=fgets($fp) ;
            while(!feof($fp )) {
            $tmp=fgets($fp) ;
            $t=explode(";", $tmp);
            $val=str_replac e("\"","",$t) ;
            $val=str_replac e("\\","",$val) ;

            insert into....

            Comment

            • Geoff Muldoon

              #7
              Re: Importing data from Excel into PHP

              michal.maciejcz ak@tesco.net says...[color=blue]
              > Is it possible to import data from excel file into php and than put it in
              > mysql database?[/color]

              Check out:
              Download PHP-ExcelReader for free. PHP Library for read Excel files

              and


              Geoff M

              Comment

              • Michal Maciejczak

                #8
                Re: Importing data from Excel into PHP

                Thank you very much,
                That's exacly what I've been looking for


                Comment

                Working...