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 showCheckSyntaxButton to true
showCheckSyntaxButton:true,
// set checkSyntax to true
checkSyntax:true,
};
xs = x_spreadsheet('#gridjs-demo', option)
For example:
const checkurl = "/GridJs2/CheckSyntax";
xs.setSyntaxCheckUrl(checkurl);
After a user enters text content in a cell, the action of syntax checking will be triggered automatically by the spreadsheet application.
For example:
[HttpPost]
public async Task<IActionResult> CheckSyntaxAsync()
{ // the input text content
string text = HttpContext.Request.Form["v"];
/* the locale info: support multiple languages for menus; the locale can be:
en, zh, es, pt, de, ru, nl,
for English, Chinese, Spanish, Portuguese, German, Russian, Dutch
ar, fr, id, it, ja,
for Arabic, French, Indonesian, Italian, Japanese
ko, th, tr, vi, cht
for Korean, Thai, Turkish, Vietnamese, Traditional Chinese
*/
string locale = HttpContext.Request.Form["locale"];
if (string.IsNullOrEmpty(text))
{
return Ok(new
{
Success = false,
v = ""
});
}
// The logic for invoking syntax checking here can be implemented through a third‑party library or custom logic.
string correctedContent = await CorrectSyntaxAsync(text, locale);
return Ok(new
{
Success = true,
v = correctedContent
});
}
// you need to implement it yourself
private async Task<string> CorrectSyntaxAsync(string text, string locale)
{ string result = null;
// your logic to perform syntax checking
return result;
}
You can find more on our GitHub demo page: https://github.com/aspose-cells/Aspose.Cells.Grid-for-.NET/blob/master/Examples_GridJs/wwwroot/xspread/index.html
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.