回复 4楼figoyu的帖子
- DefaultSheetDataModel dtModel = (FpSpread1.Sheets[0].DataModel as DefaultSheetDataModel);
- dtModel.AddCustomName("DataArea", new ExternalRangeExpression(dtModel, 1, 1, 2, 2));
- FpSpread1.Columns.Add(0, 1);
- FpSpread1.Rows.Add(0, 1);
- FpSpread1.Columns.Add(0, 1);
- FpSpread1.Rows.Add(0, 1);
- var customnames = dtModel.GetCustomNameEnumerator();
- while (customnames.MoveNext())
- {
- ExternalRangeExpression expr = FpSpread1.Sheets[0].GetCustomName(customnames.Current.ToString()) as ExternalRangeExpression;
- }
复制代码 |