Hi Team,
I have a cell with large content, and the text is wrapped within the cell. However, when I hover over the cell, I’m unable to see the full content as a tooltip or hover preview. Can we achieve this functionality?
I am using Grid js aspose cell for python via dotnet
@sarathepiq
Cause
To display the full content of a cell as a tooltip when hovering over it in Aspose.Cells for Python via .NET, you need to enable the tooltip feature in the HTML export options. By default, this feature may not be activated, which is why you’re not seeing the full content.
Solution
You can achieve this by setting the AddTooltipText property of the HtmlSaveOptions class to true. This will ensure that any text that cannot be fully displayed in the cell will be shown as a tooltip when the user hovers over it.
Code
Here’s a sample code snippet to demonstrate how to implement this:
from aspose.cells import Workbook, HtmlSaveOptions
# Load the workbook
workbook = Workbook("your_file.xlsx")
# Create HtmlSaveOptions and set AddTooltipText to true
options = HtmlSaveOptions()
options.add_tooltip_text = True
# Save the workbook as HTML
workbook.save("output.html", options)
Next Steps
- Replace
"your_file.xlsx" with the path to your actual Excel file.
- Run the code to generate the HTML file.
- Open the resulting HTML file in a web browser and hover over the cells to see the tooltips.
This should resolve your issue effectively. If you have any further questions or need additional assistance, feel free to ask!
@sarathepiq
We currently do not offer such a feature to display tooltips or hover previews. Similarly, MS Excel does not include such functionality. From a UI design perspective, showing this value is redundant or unnecessary since it is already displayed within the cell. However, could you provide a rough snapshot or mockup of how it might look?