View Single Post
 
Old 03-11-2010, 07:30 AM
c-tran c-tran is offline Windows XP Office 2007
Novice
 
Join Date: Mar 2010
Posts: 1
c-tran is on a distinguished road
Question Pasting HTML into Excel (height auto-adjust)

I got a problem.
Maybe it's Excel (2003, 2007) usual behaviour, but when I insert merged cells from HTML table into Excel (using the clipboard), everything is fine, except the height of the resulting rows.
Excel automatically adjust row height, but it feels like Excel doesn't take into account padding in the source HTML cells while calculating row heights, and thus some words become invisible after applying padding of the source cell.

Briefly it looks like Excel doing these operations:
1. insert data
2. set new height depending on data and text-format
3. apply padding of the source cells into excel cells

So, is there a way to copy-paste merged cells with left padding to Excel? Is there a style sheet parameter to point Excel how to adjust height correctly?

A simple example to try:
Code:
<html>
<body>
<table>
 <tr><td colspan=2 style="padding: 1mm 1mm 1mm 10mm; width: 5mm;">A big red or brown fox or bear is running away through the rabbit hole</td></tr>
</table>
</body>
</html>
Just select it in browser and insert into default Excel sheet, and you won't see some last words of the phrase.
Reply With Quote