你好,Spread 设置样式是以单元格为单位的,暂时不支持单元部分文字的样式更改,给你带来不便,很抱歉。
实现方法如下:
- protected void Button1_Click1(object sender, EventArgs e)
- {
- int x = 0;
- int y = 0;
- this.FpSpread1.ActiveSheetView.Cells[0, 0].Text = "test";
- FpSpread1.Search(0, "test", false, false, false, false, 0, 0, ref x, ref y);
- FarPoint.Web.Spread.StyleInfo a = new FarPoint.Web.Spread.StyleInfo();
- a.ForeColor = System.Drawing.Color.Red;
- FpSpread1.ActiveSheetView.SetStyleInfo(x, y, a);
- }
复制代码 |