wjj_123 你好,
如果需要验证单元格不为空,可以使用 RegExpCellType ,设置方式如下:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- FarPoint.Web.Spread.RegExpCellType re = new FarPoint.Web.Spread.RegExpCellType();
- re.ErrorMessage = "单元格非空";
- re.ValidationExpression = "^\\d{0}$";
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = re;
- }
- }
复制代码 |