回复 6楼iceman的帖子
可以通过以下代码实现:
- private void CopySheet()
- {
- for (int i = 0; i < this.FpSpread1.Sheets.Count; i++)
- {
- //复制行列值
- this.FpSpread1.Sheets[i].RowCount = this.FpSpread1.Sheets[0].RowCount;
- this.FpSpread1.Sheets[i].ColumnCount = this.FpSpread1.Sheets[0].ColumnCount;
- //复制合并模型
- this.FpSpread1.Sheets[i].SpanModel = this.FpSpread1.Sheets[0].SpanModel;
- //复制样式 包括字体 网格线 颜色
- this.FpSpread1.Sheets[i].StyleModel = this.FpSpread1.Sheets[0].StyleModel;
- }
-
- }
复制代码 |