var value; // Type: autoFitColumn value = GC.Spread.Sheets.Commands.autoFitColumn;
var autoFitColumn : autoFitColumn;
var value; // Type: autoFitColumn value = GC.Spread.Sheets.Commands.autoFitColumn;
var autoFitColumn : autoFitColumn;
//Add data for (var col = 1; col < 6; col++) { for (var row = 2; row < 11; row++) { activeSheet.setValue(row, col, row + col); } } $("#button1").click(function () { var columns = [ { col: 3 } ]; spread.options.allowUndo = true; spread.commandManager().execute({cmd: "autoFitColumn", sheetName: "Sheet1", columns: columns, isRowHeader: false, autoFitType: GC.Spread.Sheets.AutoFitType.cell}); }); <input type="button" id="button1" value="button1"/>