Results 1 to 2 of 2

Thread: Pulling data from an excel spreadsheet

  1. #1
    Join Date
    Oct 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pulling data from an excel spreadsheet

    For a website I'm designing, I would like to have a customer testimonials page that rotates the data based on an excel spreadsheet. The excel spreadsheet has two columns, one named "Company Name" and one named "testimony".

    What I would like is to have a header and text area that pull the "company name" and "testimony" from any given row, puts the "company name" in the header and the "testimony" in the text area. When the page is reloaded it pulls a different "company name" and "testimony" from a different row, so the testimony showing changes each time the page is reloaded. Also, the coding would have to allow for changes to the database as more customer testimonials are added. It doesn't matter to me if the customer testimonials are loaded in sequential order of if they are pulled at random.

    I would say I'm at an intermediate level of javascripting, but I don't even know where to start on something like this, or if it would even be possible to this with just javascripting.

    Has anyone done anything like this or know how it could be done? I'm open to other types of databases besides using excel if you know of a way to do it.
    Thanks in advance for any help on this.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I would say I'm at an intermediate level of javascripting, but I don't even know where to start on something like this, or if it would even be possible to this with just javascripting.
    JavaScript won't be of any use to you here. At least not in the basic functionality. This is a server-side operation. JavaScript is client-side.

    Has anyone done anything like this or know how it could be done?
    Sure, it's a very basic and common functionality. I would use PHP and a MySQL database to do this. Here is a tutorial that will walk you through it.

    I'm open to other types of databases besides using excel if you know of a way to do it.
    For all practical purposes, you can't use Excel. There are ways of linking Excel to an online database (see this tutorial) but you can't directly extract data to an Excel file.

    My suggest would be to use a program (example) to convert your Excel data into a MySQL database. Then, go strictly PHP and MySQL.

    Of course, this all assumes that you have PHP and MySQL available on your host. If you have ASP and MSSQL, the same principals apply. In fact, you can do this with any database/server-side language combination you wish.

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
  •