Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
For example:
const option = {
...
// set showFormulaExplain to true
showFormulaExplain:true,
};
xs = x_spreadsheet('#gridjs-demo', option)
For example:
const formulaExplainUrl = "/GridJs2/FormulaExplain";
xs.setFormulaExplainUrl(formulaExplainUrl);
When the user moves the mouse over a cell that contains a formula, the action of displaying the formula explanation will be triggered automatically by the spreadsheet application.
For example:
[HttpPost]
public async Task<IActionResult> FormulaExplainAsync()
{
string formulaText = HttpContext.Request.Form["v"];
string locale = HttpContext.Request.Form["locale"];
if (string.IsNullOrEmpty(formulaText))
{
return Ok(new
{
Success = false,
v = ""
});
}
// here the formulaText is the formula, e.g., "=SUM(B1:B10)"
string correctedContent = await GetFormulaExplainAsync(formulaText, locale);
return Ok(new
{
Success = true,
v = correctedContent
});
}
// you need to implement it yourself
private async Task<string> GetFormulaExplainAsync(string formulaText, string locale)
{
// your logic to get the detailed explanation for the formulaText
string result = null;
return result;
}

Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.