COM("Excel.Application")

Discussion in 'PHP' started by roice, Jan 16, 2012.

  1. #1
    Hello,

    I founda script with this code:
    $xlApp = new COM("Excel.Application");

    On my local its run OK but on my share host server (live server) I got this error:
    "Fatal error: Class 'COM' not found in /home/public_html/importFile.php on line 6"

    (The script should take XLS file and impot the data to DB.)

    Why is that and how can I fix it?

    Thanks you all in advanced.
     
    roice, Jan 16, 2012 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    This executes an application on computer php is running from. It's probably not going to be possible to use this on a web server for an excel application. Here's a good Excel library for php: http://phpexcel.codeplex.com/
     
    jestep, Jan 16, 2012 IP
  3. roice

    roice Peon

    Messages:
    200
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So...How can I import data from xls (excel) files?
    I saw number of website that alow user import their data from external files, such as xls...
    ?
     
    roice, Jan 16, 2012 IP