0

A colleague is automating the creation of an email report in MS Outlook 2013 from MS Excel 2013 using this code from Ron de Bruin.

The code ignores charts so what we have done is merge all the cells behind where a charts sits on the spreadsheet and then once we have the email in Outlook (we use the .display property rather than .send so we can check and edit the mail before sending it) we can just regular copy and paste the charts into these merged cell blocks and everything looks great.

However, when we use the exact same spreadsheet (it's on a network drive) on a different computer, the mail in Outlook has different row heights. This means that the merged cell block is now taller and when we paste the charts in they no longer fill the space.

Does anyone know of a Windows / Outlook / Excel setting that might be causing this? We're running Windows 8 and Office 2013 Home and Business.


Here are screenshots of a sample from both computers:

Screenshot from first computer

Screenshot from second computer

So the row height on the second computer is larger and this cause an area of white space under the chart (which is pasted into a large area of merged cells).

We also looked at the HTML on each computer and there is indeed a difference. Here is a small sample from each:

<body> 
<!--[if !excel]>&nbsp;&nbsp;<![endif]--> 
<!--The following information was generated by Microsoft Excel's Publish as Web 
Page wizard.--> 
<!--If the same item is republished from Excel, all information between the DIV 
tags will be replaced.--> 
<!-----------------------------> 
<!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD --> 
<!-----------------------------> 
<div id="Sheet1_25510" align=left x:publishsource="Excel"> 
<table border=0 cellpadding=0 cellspacing=0 width=807 style='border-collapse: 
 collapse;table-layout:fixed;width:605pt'> 
 <col width=56 span=2 style='width:42pt'> 
 <col width=135 style='mso-width-source:userset;mso-width-alt:5760;width:101pt'> 
 <col width=56 span=10 style='width:42pt'> 
 <tr height=16 style='height:12.0pt'> 
  <td height=16 class=xl6325510 width=56 style='height:12.0pt;width:42pt'>&nbsp;</td> 
  <td class=xl6325510 width=56 style='border-left:none;width:42pt'>&nbsp;</td> 
  <td class=xl6325510 width=135 style='border-left:none;width:101pt'>&nbsp;</td> 
  <td class=xl6325510 width=56 style='border-left:none;width:42pt'>&nbsp;</td>
...

And

<body> 
<!--[if !excel]>&nbsp;&nbsp;<![endif]--> 
<!--The following information was generated by Microsoft Excel's Publish as Web 
Page wizard.--> 
<!--If the same item is republished from Excel, all information between the DIV 
tags will be replaced.--> 
<!-----------------------------> 
<!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD --> 
<!-----------------------------> 
<div id="Sheet1_17217" align=left x:publishsource="Excel"> 
<table border=0 cellpadding=0 cellspacing=0 width=903 style='border-collapse: 
 collapse;table-layout:fixed;width:677pt'> 
 <col width=64 span=2 style='width:48pt'> 
 <col width=135 style='mso-width-source:userset;mso-width-alt:4937;width:101pt'> 
 <col width=64 span=10 style='width:48pt'> 
 <tr height=20 style='height:15.0pt'> 
  <td height=20 class=xl6317217 width=64 style='height:15.0pt;width:48pt'>&nbsp;</td> 
  <td class=xl6317217 width=64 style='border-left:none;width:48pt'>&nbsp;</td> 
  <td class=xl6317217 width=135 style='border-left:none;width:101pt'>&nbsp;</td> 
  <td class=xl6317217 width=64 style='border-left:none;width:48pt'>&nbsp;</td> 
  <td class=xl6317217 width=64 style='border-left:none;width:48pt'>&nbsp;</td> 
...

The row height in the first HTML is 16 (i.e., <tr height=16...) and in the second it is 20!

6
  • Do you really feel the spreadsheet on a network drive makes any difference? I would investigate if the configuration of first workstation is different from the second? For example, are the Excel versions and/or Outlook versions different? Are there any special add-ons from Microsoft or third-party? Do you have screenshots of first workstation and second workstation of the different row heights?
    – Sun
    May 9, 2016 at 15:03
  • All the versions of Excel and Outlook are the same. No different Add-Ins. The point about the sheet being on a network drive is that it is literally the same sheet in both cases, not a copy.
    – Dan
    May 9, 2016 at 15:12
  • Do you have a way to compare the HTML output from both workstations? There's gotta be a simple explanation. ExamDiff is free: prestosoft.com/edp_examdiff.asp
    – Sun
    May 9, 2016 at 15:34
  • I'll try check this tomorrow. I could just print the HTML out as text and look for differences.
    – Dan
    May 9, 2016 at 15:37
  • @LunaMezza I have added screenshots and a sample of the HTML. The HTML is indeed different on the two with each having it's own row height
    – Dan
    May 18, 2016 at 7:19

0

You must log in to answer this question.