回复 3楼noahark的帖子
谢谢您提供的需求表样。
通过如下代码可实现:
- if (!IsPostBack)
- {
- FpSpread1.ActiveSheetView.RowCount = 10;
- FpSpread1.ActiveSheetView.ColumnHeader.RowCount = 2;
- FpSpread1.ActiveSheetView.RowHeader.ColumnCount = 2;
- FpSpread1.ActiveSheetView.SheetCorner.Cells[0, 0].Text = "产品构成";
- FpSpread1.ActiveSheetView.SheetCorner.Cells[0, 0].RowSpan = 2;
- FpSpread1.ActiveSheetView.SheetCorner.Cells[0, 0].ColumnSpan = 1;
- FpSpread1.ActiveSheetView.RowHeader.Cells[0, 0].RowSpan = 4;
- FpSpread1.ActiveSheetView.RowHeader.Cells[0, 0].Text = "住宅";
- FpSpread1.ActiveSheetView.RowHeader.Cells[0, 1].Text = "酒店式公寓";
- FpSpread1.ActiveSheetView.RowHeader.Columns[1].Width = 80;
- FpSpread1.ActiveSheetView.RowHeader.Cells[1, 1].Text = "小高层";
- FpSpread1.ActiveSheetView.RowHeader.Cells[2, 1].Text = "多层";
- FpSpread1.ActiveSheetView.RowHeader.Cells[3, 1].Text = "洋房";
- FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, 0].Text = "建筑覆盖面积";
- FpSpread1.ActiveSheetView.ColumnHeader.Cells[1, 0].Text = "";
- FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, 1].Text = "地块面积";
- FpSpread1.ActiveSheetView.ColumnHeader.Cells[1, 1].Text = "A";
- FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, 2].Text = "容积率";
- FpSpread1.ActiveSheetView.ColumnHeader.Cells[1, 2].Text = "B=D/A";
- }
复制代码
|