你可以参考以下代码,其中的第一列(代码中的Cells[i,0])是URL中的参数值,该列不显示:
- string url = "http://www.gcpowertools.com";
- for (int i = 0; i < FpSpread1.ActiveSheetView.RowCount; i++)
- {
- HyperLinkCellType hl = new HyperLinkCellType();
- hl.Target = "_blank";
- hl.ImageUrl = "link.jpg";
- hl.NavigateUrl = String.Format("{0}?para={1}",url,FpSpread1.ActiveSheetView.Cells[i,0].Value);
- FpSpread1.ActiveSheetView.Cells[i, 3].CellType = hl;
- }
复制代码 |