这是代码 你们看看我是那设置的有问题还是什么原因导致的
<script type="text/javascript" charset="utf-8">
var spread = null;
$(function () {
spread = new GcSpread.Sheets.Spread($("#ss")[0]);
spread.tabStripVisible(false);
spread.showHorizontalScrollbar(true);
spread.showVerticalScrollbar(true);
var sheet = spread.getActiveSheet();
sheet.isPaintSuspended(true);
sheet.setIsProtected(true);
sheet.getColumns(1, 37).locked(false);
sheet.defaults.rowHeight = 22;
sheet.defaults.colWidth = 100;
sheet.autoGenerateColumns = false;
//sheet.setFrozenColumnCount(2);
var h = GcSpread.Sheets.SheetArea.colHeader;
sheet.setColumnCount(37, h);
sheet.setColumnCount(37, GcSpread.Sheets.SheetArea.viewport);
sheet.setValue(0, 0, "id", h);
sheet.setValue(0, 1, "列1", h);
sheet.setValue(0, 2, "列2", h);
sheet.setValue(0, 3, "列3", h);
sheet.setValue(0, 4, "列4", h);
sheet.setValue(0, 5, "列5", h);
sheet.setValue(0, 6, "列6", h);
sheet.setValue(0, 7, "列7", h);
sheet.setValue(0, 8, "列8", h);
sheet.setValue(0, 9, "列9", h);
sheet.setValue(0, 10, "列10", h);
sheet.setValue(0, 11, "列11", h);
sheet.setValue(0, 12, "列12", h);
sheet.setValue(0, 13, "列13", h);
sheet.setValue(0, 14, "列14", h);
sheet.setValue(0, 15, "列15", h);
sheet.setValue(0, 16, "列16", h);
sheet.setValue(0, 17, "列17", h);
sheet.setValue(0, 18, "列18", h);
sheet.setValue(0, 19, "列19", h);
sheet.setValue(0, 20, "列20", h);
sheet.setValue(0, 21, "列21", h);
sheet.setValue(0, 22, "列22", h);
sheet.setValue(0, 23, "列23", h);
sheet.setValue(0, 24, "列24", h);
sheet.setValue(0, 25, "列25", h);
sheet.setValue(0, 26, "列26", h);
sheet.setValue(0, 27, "列27", h);
sheet.setValue(0, 28, "列28", h);
sheet.setValue(0, 29, "列29", h);
sheet.setValue(0, 30, "列30", h);
sheet.setValue(0, 31, "列31", h);
sheet.setValue(0, 32, "列32", h);
sheet.setValue(0, 33, "列33", h);
sheet.setValue(0, 34, "列34", h);
sheet.setValue(0, 35, "列35", h);
sheet.setValue(0, 36, "列36", h);
sheet.setValue(0, 37, "列37", h);
sheet.isPaintSuspended(false);
})
</script>
<div id="ss" style="width: 100%;"></div> |