|  | @@ -8,10 +8,11 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |      DEFAULT_DATA_STYLE: null,
 | 
	
		
			
				|  |  |      cellType: {
 | 
	
		
			
				|  |  |          getText: null,
 | 
	
		
			
				|  |  | +        cellType: null,
 | 
	
		
			
				|  |  |          readOnly: null,
 | 
	
		
			
				|  |  |          checkBox: null
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    Rows: {data: 0, filedName: 0, getText: 1, wordWrap: 2, width: 3, readOnly: 4, showHint: 5},
 | 
	
		
			
				|  |  | +    Rows: {data: 0, filedName: 0, getText: 1, wordWrap: 2, cellType: 3, width: 4, readOnly: 5, showHint: 6, visible: 7},
 | 
	
		
			
				|  |  |      columnValueChanged: function (e, info) {
 | 
	
		
			
				|  |  |          let that = ColSettingObj;
 | 
	
		
			
				|  |  |          info.colList.forEach(function (iCol) {
 | 
	
	
		
			
				|  | @@ -52,13 +53,21 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |          this.cellType.getText = new GC.Spread.Sheets.CellTypes.ComboBox();
 | 
	
		
			
				|  |  |          this.cellType.getText.items(['getText.type']);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        this.cellType.cellType = new GC.Spread.Sheets.CellTypes.ComboBox();
 | 
	
		
			
				|  |  | +        this.cellType.cellType.items(['cellType.units']);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          this.cellType.checkBox = new GC.Spread.Sheets.CellTypes.CheckBox();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      initSheet: function (sheet, setting) {
 | 
	
		
			
				|  |  | +        let initColProperty = function (iRow, title) {
 | 
	
		
			
				|  |  | +            sheet.setText(setting.headRows + iRow, 0, title, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | +            sheet.addSpan(setting.headRows + iRow, 0, 1, 2, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          sheet.setColumnCount(2, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  |          sheet.setColumnWidth(0, 80, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  |          sheet.setColumnWidth(1, 70, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | -        sheet.setRowCount(setting.headRows + this.Rows.showHint + 1);
 | 
	
		
			
				|  |  | +        sheet.setRowCount(setting.headRows + this.Rows.visible + 1);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          sheet.setText(setting.headRows + this.Rows.data, 0, 'Data', GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  |          sheet.setStyle(setting.headRows + this.Rows.data, -1, this.DEFAULT_DATA_STYLE);
 | 
	
	
		
			
				|  | @@ -68,14 +77,11 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |          sheet.setText(setting.headRows + this.Rows.getText, 1, 'getText', GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  |          sheet.setText(setting.headRows + this.Rows.wordWrap, 1, 'wordWrap', GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        sheet.setText(setting.headRows + this.Rows.width, 0, 'width', GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | -        sheet.addSpan(setting.headRows + this.Rows.width, 0, 1, 2, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        sheet.setText(setting.headRows + this.Rows.readOnly, 0, 'ReadOnly', GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | -        sheet.addSpan(setting.headRows + this.Rows.readOnly, 0, 1, 2, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        sheet.setText(setting.headRows + this.Rows.showHint, 0, 'ShowHint', GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | -        sheet.addSpan(setting.headRows + this.Rows.showHint, 0, 1, 2, GC.Spread.Sheets.SheetArea.rowHeader);
 | 
	
		
			
				|  |  | +        initColProperty(this.Rows.width, 'Width');
 | 
	
		
			
				|  |  | +        initColProperty(this.Rows.readOnly, 'ReadOnly');
 | 
	
		
			
				|  |  | +        initColProperty(this.Rows.showHint, 'ShowHint');
 | 
	
		
			
				|  |  | +        initColProperty(this.Rows.visible, 'Visible');
 | 
	
		
			
				|  |  | +        initColProperty(this.Rows.cellType, 'CellType');
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      initColSetting: function (setting) {
 | 
	
		
			
				|  |  |          this.DEFAULT_TITLE_STYLE = this.getCellStyle('Arial', GC.Spread.Sheets.HorizontalAlign.center, GC.Spread.Sheets.VerticalAlign.center);
 | 
	
	
		
			
				|  | @@ -87,11 +93,15 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |          $('#header-row-count').val(setting.headRows);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          colEditSpread = new GC.Spread.Sheets.Workbook($('#colEditSpread')[0], {sheetCount: 1});
 | 
	
		
			
				|  |  | +        colEditSpread.getActiveSheet().setRowCount(0);
 | 
	
		
			
				|  |  | +        colEditSpread.getActiveSheet().setColumnCount(0);
 | 
	
		
			
				|  |  |          colEditSpread.options.tabStripVisible = false;
 | 
	
		
			
				|  |  |          colEditSpread.bind(GC.Spread.Sheets.Events.ColumnWidthChanged, this.columnValueChanged);
 | 
	
		
			
				|  |  |          colEditSpread.bind(GC.Spread.Sheets.Events.ValueChanged, this.valueChanged);
 | 
	
		
			
				|  |  |          colEditSpread.bind(GC.Spread.Sheets.Events.SelectionChanged, this.selectionChanged);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        colEditSpread.getActiveSheet().suspendPaint();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          this.initSheet(colEditSpread.getActiveSheet(), setting);
 | 
	
		
			
				|  |  |          this.setColCount(this.colSetting.cols.length);
 | 
	
		
			
				|  |  |          this.setHeaderRowCount(this.colSetting.headRows);
 | 
	
	
		
			
				|  | @@ -134,6 +144,9 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |                  // wordWrap
 | 
	
		
			
				|  |  |                  cell = sheet.getCell(this.colSetting.headRows + this.Rows.wordWrap, iCol, GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  |                  cell.cellType(this.cellType.checkBox).value(col.data.wordWrap).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
 | 
	
		
			
				|  |  | +                // cellType
 | 
	
		
			
				|  |  | +                cell = sheet.getCell(this.colSetting.headRows + this.Rows.cellType, iCol, GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  | +                cell.cellType(this.cellType.cellType).value(col.data.cellType).hAlign(GC.Spread.Sheets.HorizontalAlign.right);
 | 
	
		
			
				|  |  |                  // 列宽
 | 
	
		
			
				|  |  |                  sheet.setColumnWidth(iCol, col.width);
 | 
	
		
			
				|  |  |                  sheet.setValue(this.colSetting.headRows + this.Rows.width, iCol, sheet.getColumnWidth(iCol), GC.Spread.Sheets.SheetArea.viewport);
 | 
	
	
		
			
				|  | @@ -143,8 +156,14 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |                  // showHint
 | 
	
		
			
				|  |  |                  cell = sheet.getCell(this.colSetting.headRows + this.Rows.showHint, iCol, GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  |                  cell.cellType(this.cellType.checkBox).value(col.showHint).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
 | 
	
		
			
				|  |  | +                // visible
 | 
	
		
			
				|  |  | +                cell = sheet.getCell(this.colSetting.headRows + this.Rows.visible, iCol, GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  | +                cell.cellType(this.cellType.checkBox).value(col.visible).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        colEditSpread.getActiveSheet().resumePaint();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          let cell = colEditSpread.getActiveSheet().getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  |          if (cell) {
 | 
	
		
			
				|  |  |              $('#font').val(cell.font());
 | 
	
	
		
			
				|  | @@ -152,14 +171,20 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      setColCount: function (count) {
 | 
	
		
			
				|  |  |          let sheet = colEditSpread.getActiveSheet();
 | 
	
		
			
				|  |  | +        let orgCount = sheet.getColumnCount();
 | 
	
		
			
				|  |  |          sheet.setColumnCount(count);
 | 
	
		
			
				|  |  | -        for (let iCol = 0; iCol < sheet.getColumnCount(); iCol++) {
 | 
	
		
			
				|  |  | +        for (let iCol = orgCount; iCol < count; iCol++) {
 | 
	
		
			
				|  |  | +            for (let iRow = 0; iRow < this.colSetting.headRows; iRow ++) {
 | 
	
		
			
				|  |  | +                sheet.setStyle(iRow, iCol, this.DEFAULT_TITLE_STYLE);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |              sheet.getCell(this.colSetting.headRows + this.Rows.getText, iCol).cellType(this.cellType.getText).hAlign(GC.Spread.Sheets.HorizontalAlign.right);
 | 
	
		
			
				|  |  |              sheet.getCell(this.colSetting.headRows + this.Rows.wordWrap, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
 | 
	
		
			
				|  |  | +            sheet.getCell(this.colSetting.headRows + this.Rows.cellType, iCol).cellType(this.cellType.cellType).hAlign(GC.Spread.Sheets.HorizontalAlign.right);
 | 
	
		
			
				|  |  |              sheet.setValue(this.colSetting.headRows + this.Rows.width, iCol, sheet.getColumnWidth(iCol), GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  |              sheet.getCell(this.colSetting.headRows + this.Rows.readOnly, iCol).cellType(this.cellType.readOnly).hAlign(GC.Spread.Sheets.HorizontalAlign.right);
 | 
	
		
			
				|  |  |              sheet.setValue(this.colSetting.headRows + this.Rows.readOnly, iCol, false, GC.Spread.Sheets.SheetArea.viewport);
 | 
	
		
			
				|  |  |              sheet.getCell(this.colSetting.headRows + this.Rows.showHint, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
 | 
	
		
			
				|  |  | +            sheet.getCell(this.colSetting.headRows + this.Rows.visible, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center).value(true);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      setHeaderRowCount: function (count) {
 | 
	
	
		
			
				|  | @@ -218,6 +243,7 @@ let ColSettingObj = {
 | 
	
		
			
				|  |  |              if (sheet.getValue(setting.headRows + this.Rows.showHint, iCol)) {
 | 
	
		
			
				|  |  |                  col.showHint = sheet.getValue(setting.headRows + this.Rows.showHint, iCol) || false;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            col.visible = sheet.getValue(setting.headRows + this.Rows.visible, iCol) || false;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              col.head = {};
 | 
	
		
			
				|  |  |              col.head.titleNames = [];
 |