Using Aspose Cells for Java, version 19.9.
It seems that in recent versions, Aspose Cells has slightly changed the format of the generated HTML. Now, for each row, an
id attribute is added:
<tr height='20' style='mso-height-source:userset;height:15pt' id='r0'> <td height='20' width='64' style='height:15pt;width:48pt;'>foo</td> </tr> <tr height='20' style='mso-height-source:userset;height:15pt' id='r1'> <td height='20' style='text-align:right;height:15pt;'>1</td> </tr>
It seems that this is an Aspose-specific attribute, as the output from Excel 365 does not include such attributes. In our application we are loading and showing multiple exported worksheets in a single web page. Because of the unconditional, sequential id generation for
<tr> elements, we run into
In a way, this issue is very similar to the one described in Problem with Excel to Html Conversion, for which you introduced the
If the intent of adding the
id attribute was to encode the information regarding “which row is this?” into the generated HTML, HTML data attributes seem a better option. Unlike the
id attribute, data attribute values simply contain data, and do not require uniqueness across the document.
It would be nice if we could configure whether row
id attributes are generated in HTML. Another option would be a add a prefix property, similar to
cssStylePrefix. But I think switching to a data attribute as described above would be the best option overall.
id.zip (7.7 KB)