Grow your CSS skills. Land your dream job.

HTML Table to Excel

  • # August 16, 2011 at 12:02 am

    Hello all,

    I am having a webpage which contains an HTML table which is populated through PHP dynamically. I want the users to export this specific table (Not all tables) to excel file, and then may be they will be able to save it on there disk. I don’t know how to do it. I even don’t know where to start. Please guide me through ..

    Thanks.

    # August 17, 2011 at 7:25 am

    Your best bet would be to write the data out into a text file. Name the file whatever.csv and put a comma between the fields that you write out.

    There you have a CSV file. Which, although not strictly an Excel formatted file will open in Excel.

    # August 17, 2011 at 10:01 am

    If you wan’t to be simple, just write it as CSV file.
    If you need more features, try PHPExcel, it’s a PHP class that generate/parse MS excel format with PHP.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".