SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Feb 2009
    Location
    israel
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table, written with HTML. How can i download it to Excel spreadsheet ?

    Hi everyone,
    There is a 2000 lines table in an HTML site, containing information I want to have in an Excel spreadsheet.
    Can it be downloaded ? is there a way to convert "Table" HTML code to Excel?
    Thanks a lot

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Load the webpage in your browser, highlight the table contents, copy, paste into Excel ... works for me!

  3. #3
    SitePoint Addict
    Join Date
    Feb 2009
    Location
    israel
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Stevie.
    What this did to me, it pasted the whole table over one column. I couldnt make it dispersed over more then one column.
    Thanks

  4. #4
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by deotpit View Post
    Thanks Stevie.
    What this did to me, it pasted the whole table over one column. I couldnt make it dispersed over more then one column.
    Thanks
    What browser? What version of Excel?

    Another option is to open the HTML file in Word, and this should preserve the table structure. You can then copy and paste from Word into Excel more easily.

  5. #5
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Silly question, are you sure the page in question ACTUALLY used table tags? A lot of dimwits out there are now abusing all sorts of other tags on TABULAR DATA, pretty much flushing semantics down the toilet and then having the nerve to call it more semantic. See the skins of several recent forum upgrades for examples of said stupidity in action. (vBulletin for example).

    Also, what browser did you 'cut' from where it failed? All browsers are not created equal on this... the worst of the lot being *drumroll*..... IE. I know, no surprises there. Safari, FF and Chrome will auto-bold and center TH, while cut/paste from opera treats all elements as flat cells.

    Also, only select the table, if you select 'extra' bits it can confuse Excel.

    Try this small example table:
    http://battletech.hopto.org/html_tut...leExample.html

    Which FF, Safari, Chrome and Opera all do a right fine job to Excel or LibreOffice -- while IE makes a right mess of it with a single column result in LibreOffice and one massive cell in Excel.

    Excel can also just act... weird if you're using older versions (office 97)... or bleeding versions. (office 2010 on x64, it's fine on x32 for some reason) -- 2k3 and XP both handling it well... You may end up having to use libreoffice as a intermediary should you be on one of the versions that just completely screws up cut/paste.

    Which is why increasingly I'm using LibreOffice instead of Office... even if the word processor still kerns text like a sweetly retarded rhesis monkey on crack. (It's not AS bad as it used to be when it was openOffice, at least on Windows (freetype is still USELESS for working with text) -- so glad there's a non-sun non-oracle fork now!)

  6. #6
    SitePoint Addict
    Join Date
    Feb 2009
    Location
    israel
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot both of you.
    "Deathshadow" is right. I checked the code, didnt find css code neither <table> tags but lots of <tr><td><div><span
    I added <table> tags, got rid of all the divs and spans and then i managed to transfer the table to Excel as Stevie suggested.
    I thank you very much for your help and sorry for someone else's misleading code.


Tags for this Thread

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
  •