SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Import the contents of a spreadsheet

    Hi
    Is there an easy way to import the contents of a spreadsheet into
    a webpage? I need to update a page with new data.


    Thanks

  2. #2
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    It depends on the spreadsheet and the web page. Probably, the best solution will be saving the spreadsheet as HTML.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    The site is at swjltd (.) c0m / products (.) html

    Sombody else did this page, now my friend needs an update.

    Any advice would be greatly appreciated.

    Thanks

  4. #4
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    It really depends on the situation. If the data is inside a database, and your spreadsheet looks exactly what it looks on the page, you can save the file as .csv and the import it to the database directly. CSV is a format that most database understand, just make sure that the columns are in the same order.

    If the web page is just a hand coded page, and the spreadsheet format is like the one in the page, then the quickest thing to do is to save it as html and then copy and paste from one page to the other the code you need.

    If this is going to happen often, you can write a macro that could write the HTML code for you.

    If by updating you mean only changing a few items, you can still program it, but I would only take interest in doing so if the page will be updated on regular basis.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will try that. Thanks for your help.

  6. #6
    SitePoint Member liam_tmt7's Avatar
    Join Date
    Jan 2008
    Location
    Scotland
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a quick search on Google returns a good few results for Macro's that you could try: "excel to html macro"

    Depending on the size of the spreadsheet, and the formatting of the data, you could make manual adjustments.

    However, I would have to go with molona and try the Macro idea.

    Liam


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
  •