Results 1 to 6 of 6

Thread: Populating a table from excel

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    18

    Default Populating a table from excel

    Is there a way to dynamically update a table 3 columns wide from a excel spreadsheet? I have a list of living members which must be update periodically. Currently I am doing a cut & paste to move names from one cell to another in order to avoid having a blank cell in the middle of the table.

    Thanks for any assistance.
    Carl R.

  2. #2
    Senior Member LBA's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    543

    Default

    Yes but HTML is not a dynamic language so you'd have to use something like PHP. It would be pretty easy to do, although there are numerous ways to go about it. Perhaps the quickest would be for you to maintain a list of names... best if just a simple text file that you edit locally when a change needs to be made and then upload to the server. Your NOF page would then contain a few short lines of PHP code that opens the text file and sequentially places each line into it's own table cell. It would be easy if you know PHP and a good starter project for a newcomer. A better but slightly more difficult solution would be to replace the text file and upload procedure with a MySQL database and an admin web page that you use to add, edit and delete names from the list. The NOF page would build the table in a similar manner as the first solution but would pull data out of the database instead of the text file.

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    18

    Default

    Since I am not well versed with either PHP or MYSQL, can you give me a pointer on where to start?
    Thanks,
    Carl

  4. #4
    Senior Member LBA's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    543

    Default

    Maybe try the first suggestion, just learning a bit of PHP, and save the MySQL for your next project. Start by Googling "php beginner's tutorial" to get a little familiar with general concepts. Then search for specific task you need to accomplish. How to open a file. How to read it's contents one line at a time. How to make a repeating loop of commands. Then you'll create a repeating loop that will print a few bits of code to create your table and row and cell, then print one line from your file to the screen, print the close the cell and start a new one, etc. If you're patient and stick with it, the pieces will all come together and a whole new world of stuff you can do opens up to you.

  5. #5
    Junior Member
    Join Date
    Oct 2011
    Posts
    18

    Default

    Quote Originally Posted by LBA View Post
    Maybe try the first suggestion, just learning a bit of PHP, and save the MySQL for your next project. Start by Googling "php beginner's tutorial" to get a little familiar with general concepts. Then search for specific task you need to accomplish. How to open a file. How to read it's contents one line at a time. How to make a repeating loop of commands. Then you'll create a repeating loop that will print a few bits of code to create your table and row and cell, then print one line from your file to the screen, print the close the cell and start a new one, etc. If you're patient and stick with it, the pieces will all come together and a whole new world of stuff you can do opens up to you.
    thanks for the suggestion. I just started looking at PHP. Next question is how the enter the PHP code into the HTML. I know I saw it somewhere, but I don't remember where.

  6. #6
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    You may find these tutorials helpful.

    http://www.beyondfusion.com/html/phptutorials.php
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •