+ Reply to Thread
Results 1 to 8 of 8

Import HTML table to Excel... without line breaks

  1. #1
    Registered User
    Join Date
    11-30-2008
    Location
    Knoxville
    Posts
    11

    Import HTML table to Excel... without line breaks

    I have an html table (3 columns) that has a decent amount of formatting in each column. It uses the <P> attribute for seperating content blocks in each cell along with Lists (LI's) and OL's. It breaks the content on each <P> and <LI> attribute and places each item on a seperate line. I want the content to all be in one cell. I've heard about using a css style to make it stay in the same cell, but it doesn't seem to do anything at all. I've tried:

    HTML Code: 
    Does anyone know a trick ro any way to import this table into excel without all the line breaks?

  2. #2
    Registered User
    Join Date
    01-30-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Import HTML table to Excel... without line breaks

    You can try to paste it directly into the formula bar, but I'm not sure the max size of a cell will have the data all visible.

  3. #3
    Registered User
    Join Date
    11-30-2008
    Location
    Knoxville
    Posts
    11

    Re: Import HTML table to Excel... without line breaks

    This works, but I have a ton of cells that need to be completed and I don't want to do them all manually. I'm working manually until I can find a better answer. I've tried importing with various VBA code that I've found but nothing works.

  4. #4
    Registered User
    Join Date
    01-30-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Import HTML table to Excel... without line breaks

    I'm sorry, I'm not really clear on the question
    Is it that you have a bunch of .html/.css files that you want to put into excel with each occupying only 1 cells, say in row 1?

  5. #5
    Registered User
    Join Date
    11-30-2008
    Location
    Knoxville
    Posts
    11

    Re: Import HTML table to Excel... without line breaks

    I have a table with 68 rows of data (4 columns). Two of the columns include html formatting (Lists, Bullets, paragraphs, etc). when you try to copy and paste this into Excel it makes all the list items separate rows instead of combining each cell (from the html file) into one excel cell. Here is an example html:

    HTML Code: 
    Oh1A2.jpg

  6. #6
    Registered User
    Join Date
    01-30-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Import HTML table to Excel... without line breaks

    try to import it as xml?

  7. #7
    Registered User
    Join Date
    07-30-2013
    Location
    Oberhausen, Germany
    MS-Off Ver
    Excel 2011
    Posts
    1

    Re: Import HTML table to Excel... without line breaks

    Hi,

    i stumbled upon the same problem.
    I import data saved to .html files in my sheet. The data contains <p> tags as well and adding the "mso-data-placement:same-cell" to the style sheet doesn't help.
    I use a Querytable to load and copy the data to a cell. How can i achieve to have all content into one cell?

    This is the QueryTable
    Please Login or Register  to view this content.
    and this is the portion of the .html that currently goes into two cells but should go into one.
    HTML Code: 
    i added the style to the embedded stylesheet

    HTML Code: 
    Last edited by Knochi; 07-30-2013 at 06:02 AM.

  8. #8
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Import HTML table to Excel... without line breaks

    knochi,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1