Here is code I used.
var cell = activeSheet.Cells[k - kk, x + 1]; //cell.Data =dataRow[k].ToString(); cell.Data = ParsingJson.ConvertParamData(colLinkType[k], colLinkID[k], dataRow[k].ToString(), jsonOther, AboutParam.jsonLang); cell.SetHyperlink(HyperlinkType.WebAddress, ParsingJson.ConvertParamData(colLinkType[k], colLinkID[k], dataRow[k].ToString(), jsonOther, AboutParam.jsonLang), ""); workbookView.HyperlinkClicked += (sender, args) => MessageBox.Show(args.Cell.Value.ToString()); GenerateRandomFont(ref cell);
But I am not able to close the messagebox. It keep pop up. it will popup 5302 times
workbookView.HyperlinkClicked += (sender, args) => showWindow();
void showWindow() { Console.WriteLine("KKK"); }
if I only use
cell.SetHyperlink(HyperlinkType.WebAddress, ParsingJson.ConvertParamData(colLinkType[k], colLinkID[k], dataRow[k].ToString(), jsonOther, AboutParam.jsonLang), "");
the data will not show up.
Thanks
David Chiang
|