找回密码
 立即注册

QQ登录

只需一步,快速开始

gw0506

超级版主

177

主题

4208

帖子

9025

积分

超级版主

Rank: 8Rank: 8

积分
9025

活字格认证

gw0506
超级版主   /  发表于:2010-10-18 12:32  /   查看:6517  /  回复:0
使用RichTextCellType可以显示平方或者立方等指数形式的数据。代码如下:
  1.             RichTextEditor editor = new RichTextEditor();
  2.             editor.Text = "3";
  3.             editor.SelectionCharOffset = -10;
  4.             editor.SelectedText = "2";

  5.             RichTextCellType type = new RichTextCellType();
  6.             
  7.             this.fpSpread1.ActiveSheet.Cells[1, 1].CellType = type;
  8.             this.fpSpread1.ActiveSheet.Cells[1, 1].Value = editor.Rtf;
复制代码
效果如下:

png

png
您需要登录后才可以回帖 登录 | 立即注册
返回顶部