Free Support Forum - aspose.com

How do I convert XLSX to HTML without mso-xlrowspan


#1

When I convert my xlsx file to html, two of the empty rows are converted as one html row with a mso-xlrowspan style instead of two rows. I need to have the rows saved as two html rows (two <tr> tags) and not as the one row as occurs normally.

I am currently on Aspose.Cells 19.1.

HTML Save Options:

            ExportActiveWorksheetOnly = true,
            ExportGridLines = false,
            PresentationPreference = preference

Image of excel file below (notice row 5 and 6):
image.png (6.8 KB)

Html code of save file (code for lines 4-7):

 <tr height='17' style='mso-height-source:userset;height:12.75pt' id='r3'>
<td height='17' class='x22' style='height:12.75pt;'>% Oil</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class='x25' align='right' x:num="0.64458021054897308" style='text-align:right;'>64%</td>
 </tr>
 <tr height='34' style='mso-height-source:userset;height:25.5pt;mso-xlrowspan:2' id='r4'>
  <td height='34' style='height:25.5pt'></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
 </tr>
 <tr height='17' style='mso-height-source:userset;height:12.75pt' id='r5'>
<td height='17' class='x22' style='height:12.75pt;'>Total revenue</td>
<td></td>
<td></td>
<td></td>
<td class='x26' align='right' x:num="86.164000000000001" style='text-align:right;'>$           86.2</td>
<td></td>
<td class='x26' align='right' x:num="149.16658200000001" style='text-align:right;'>$         149.2</td>
 </tr>

#2

@psebastian,

Thanks for your query.
Please share your sample XLSX file, output HTML file, expected output HTML file created by Excel and complete runnable code snippet with us for our testing. We will reproduce the problem and provide our feedback after analysis.