Convert Excel to HTML with tooltip
Convert Excel to HTML with tooltip
There might be cases where the text is cut off in the generated HTML and you want to display the complete text as a tooltip on the hover event. Aspose.Cells supports this by providing HtmlSaveOptions.add_tooltip_text property. Setting the HtmlSaveOptions.add_tooltip_text property to true will add the complete text as a tooltip in the generated HTML.
The following image shows the tooltip in the generated HTML file.
The following code sample loads the source excel file and generates the output HTML file with the tooltip.
Sample Code
from aspose.cells import HtmlSaveOptions, Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# Open the template file | |
workbook = Workbook(sourceDir + "AddTooltipToHtmlSample.xlsx") | |
options = HtmlSaveOptions() | |
options.add_tooltip_text = True | |
# Save as Markdown | |
workbook.save(outputDir + "AddTooltipToHtmlSample_out.html", options) |