找回密码
 立即注册

QQ登录

只需一步,快速开始

gsyxy100

初级会员

27

主题

82

帖子

223

积分

初级会员

积分
223

活字格认证微信认证勋章

gsyxy100
初级会员   /  发表于:2013-4-23 11:34  /   查看:5100  /  回复:2
this.FpSpread1.Sheets[0].Cells[1,1].Text ="指标A"+"KG";

想在"指标A"和"KG"文本换行
后台如何用代码实现?

2 个回复

倒序浏览
gsyxy100
初级会员   /  发表于:2013-4-23 11:36:00
沙发
现在知道如何在前台设置换行,生成代码不适合后台!
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-4-23 14:21:00
板凳
回复 2楼gsyxy100的帖子

请使用以下代码测试:

  1.         protected void Page_Load(object sender, EventArgs e)
  2.         {
  3.             if (IsPostBack)
  4.             {
  5.                 return;
  6.             }

  7.             FarPoint.Web.Spread.TextCellType t = new FarPoint.Web.Spread.TextCellType();
  8.             string s = "指标A\nKG";
  9.             t.Multiline = true;
  10.             FpSpread1.ActiveSheetView.Cells[0, 0].CellType = t;
  11.             FpSpread1.ActiveSheetView.SetText(0, 0, s);  
  12.         }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部