Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Excel not parsing HTML properly - nested table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hiren.hp@gmail.com - 27 Jun 2007 19:21 GMT
Hi,

I am trying to have excel open an HTML file that contains nested
table, the outer table contains fields that can be used to perform the
sort.  But this is not working, Excel instead converts "Line 1" and
"Zipcode 1" into merged cells as well as "Line 2" and "Zipcode 2" (see
below).   If I open this HTML in browser and use Javascript function
to sort the table it works fine.

Sample HTML that has issues:
---------------------------
<HTML>
<Table>
   <TR>
       <TD>Line 1 </TD>
       <TD>Zipcode 1</TD>
        <TD><table>
              <tr bgcolor=yellow> <td> House 1</td><td>phone #</td></
tr>
              <tr bgcolor=green> <td> House 2</td><td>phone #</td></
tr>
        </table></TD>
   </TR>
   <TR>
       <TD>Line 2 </TD>
       <TD>Zipcode 2</TD>
        <TD><table>
              <tr bgcolor=green> <td> House 5</td><td>phone #</td></
tr>
              <tr bgcolor=yellow> <td> House 6</td><td>phone #</td></
tr>
              <tr bgcolor=red> <td> House 7</td><td>phone #</td></tr>
        </table></TD>
   </TR>
</HTML>

----------------------

Basically I want to create a list that I can use to sort on first
column (Line item) or second column (Zipcode).  I would prefer not to
convert the inner table into <PRE> as this works, but the results look
awful.

Thanks in advance,
Hiren
Peo Sjoblom - 27 Jun 2007 19:30 GMT
Can't you import it under data>import external data>new web query

Signature

Regards,

Peo Sjoblom

> Hi,
>
[quoted text clipped - 41 lines]
> Thanks in advance,
> Hiren
hiren.hp@gmail.com - 27 Jun 2007 19:50 GMT
Peo,

I tried it, it gives me the same results.  If you copy and paste the
HTML from my original post and open it in browser, you will see that
there are only two rows.
If you then open the HTML file in MS Excel you will see Excel convert
these cells into Merged Cells with 4 rows.

So the question is what changes can I make in my HTML so that Excel
will not merge the cells.  I would like the end result to be displayed
as follows:

LineItem  Zip     Data
Line 1     Zip1    Multiple formatted lines

Regards,
Hiren
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.