找回密码
 立即注册

QQ登录

只需一步,快速开始

lud
论坛元老   /  发表于:2012-11-15 16:26  /   查看:4565  /  回复:3
1.我在Spread 6的Web版本的columnfooter对其设置公式,显示#REF!,请问Web版本的columnfooter怎么设置公式
2.Spread 编辑单元格的时候反应速度慢,是不是需要设置什么属性才能加快反应速度

3 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2012-11-15 18:08:00
沙发
请参考以下代码:
  1.         protected void Page_Load(object sender, EventArgs e)
  2.         {
  3.             if (IsPostBack)
  4.             {
  5.                 return;
  6.             }


  7.             FpSpread1.Sheets[0].RowCount = 8;

  8.             FpSpread1.Sheets[0].ColumnCount = 15;

  9.             this.FpSpread1.ActiveSheetView.GroupBarVisible = true;

  10.             this.FpSpread1.ActiveSheetView.AllowGroup = true;

  11.             this.FpSpread1.ActiveSheetView.GroupFooterVisible = true;

  12.             this.FpSpread1.ActiveSheetView.ColumnFooter.Visible = true;

  13.             this.FpSpread1.ActiveSheetView.ColumnFooter.RowCount = 2;

  14.             this.FpSpread1.ActiveSheetView.ColumnFooter.DefaultStyle.Border.BorderStyle = BorderStyle.Double;

  15.             this.FpSpread1.ActiveSheetView.ColumnFooter.Columns[12].HorizontalAlign = HorizontalAlign.Left;

  16.             this.FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, 12].RowSpan = 2;

  17.             //Value
  18.             Random rdm = new Random();
  19.             for (int r = 0; r < this.FpSpread1.ActiveSheetView.RowCount; r++)
  20.             {

  21.                 for (int j = 0; j < this.FpSpread1.ActiveSheetView.ColumnCount; j++)
  22.                     FpSpread1.ActiveSheetView.Cells[r, j].Value = rdm.Next(10, 50);

  23.             }


  24.             int i = 0;

  25.             this.FpSpread1.ActiveSheetView.Columns[i].AggregationType = FarPoint.Web.Spread.Model.AggregationType.Sum;

  26.             this.FpSpread1.ActiveSheetView.ColumnFooter.Cells[0, i].Value = "Sum";

  27.             this.FpSpread1.ActiveSheetView.ColumnFooter.Cells[1, i].Value = "合计:[{0}]";

  28.         }
复制代码
回复 使用道具 举报
lud
论坛元老   /  发表于:2012-11-17 15:59:00
板凳
不能设置自己想要的公式吗,比如某两个单元格相减等这样自己设置
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2012-11-19 12:25:00
地板
在ColumnFooter中不能设置类似于A1-B1这样的公式,只能通过AggregationType设置。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部